pub trait Parseable {
type Parser: for<'i> Parser<Output<'i> = Self>;
const PARSER: Self::Parser;
}
Expand description
Trait for types that have a canonical parser.
Required Associated Constants§
Required Associated Types§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
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.
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.