pub trait Parse: Sized {
// Required method
fn parse(input: ParseStream<'_>) -> Result<Self>;
}
Expand description
Parsing interface for types with a default parsing method.
Required Methods§
Sourcefn parse(input: ParseStream<'_>) -> Result<Self>
fn parse(input: ParseStream<'_>) -> Result<Self>
Parses the input into this type.
§Errors
This function returns an error if source
doesn’t contain a valid instance
of T
.
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.