Skip to main content

Parseable

Trait Parseable 

Source
pub trait Parseable {
    type Parser: for<'i> Leaf<'i, Output = Self>;

    const PARSER: Self::Parser;
}
Expand description

Trait for types that have a canonical Leaf parser.

Required Associated Constants§

Source

const PARSER: Self::Parser

Required Associated Types§

Source

type Parser: for<'i> Leaf<'i, Output = Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Parseable for NonZero<i8>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<i8>

Source§

impl Parseable for NonZero<i16>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<i16>

Source§

impl Parseable for NonZero<i32>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<i32>

Source§

impl Parseable for NonZero<i64>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<i64>

Source§

impl Parseable for NonZero<i128>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<i128>

Source§

impl Parseable for NonZero<u8>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<u8>

Source§

impl Parseable for NonZero<u16>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<u16>

Source§

impl Parseable for NonZero<u32>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<u32>

Source§

impl Parseable for NonZero<u64>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<u64>

Source§

impl Parseable for NonZero<u128>

Source§

const PARSER: Self::Parser

Source§

type Parser = NonZeroParser<u128>

Source§

impl Parseable for i8

Source§

const PARSER: Self::Parser

Source§

type Parser = SignedParser<i8>

Source§

impl Parseable for i16

Source§

const PARSER: Self::Parser

Source§

type Parser = SignedParser<i16>

Source§

impl Parseable for i32

Source§

const PARSER: Self::Parser

Source§

type Parser = SignedParser<i32>

Source§

impl Parseable for i64

Source§

const PARSER: Self::Parser

Source§

type Parser = SignedParser<i64>

Source§

impl Parseable for i128

Source§

const PARSER: Self::Parser

Source§

type Parser = SignedParser<i128>

Source§

impl Parseable for u8

Source§

const PARSER: Self::Parser

Source§

type Parser = UnsignedParser<u8>

Source§

impl Parseable for u16

Source§

const PARSER: Self::Parser

Source§

type Parser = UnsignedParser<u16>

Source§

impl Parseable for u32

Source§

const PARSER: Self::Parser

Source§

type Parser = UnsignedParser<u32>

Source§

impl Parseable for u64

Source§

const PARSER: Self::Parser

Source§

type Parser = UnsignedParser<u64>

Source§

impl Parseable for u128

Source§

const PARSER: Self::Parser

Source§

type Parser = UnsignedParser<u128>

Source§

impl Parseable for usize

Parsing as usize should be discouraged as it leads to parsers which behave differently at runtime on 32-bit and 64-bit platforms, so no parser::usize() function is provided.

However, Parseable is implemented for usize as it is safe to use number_range() with a constant hard-coded max, which will fail at compile time if the constant is too large for the platform’s usize.

Source§

const PARSER: Self::Parser

Source§

type Parser = UnsignedParser<usize>

Implementors§