pub trait ParseFromParameter: Sized + Type {
// Required method
fn parse_from_parameter(value: &str) -> ParseResult<Self>;
// Provided method
fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>(
iter: I,
) -> ParseResult<Self> { ... }
}
Expand description
Represents a type that can parsing from parameter. (header, query, path, cookie)
Required Methods§
Sourcefn parse_from_parameter(value: &str) -> ParseResult<Self>
fn parse_from_parameter(value: &str) -> ParseResult<Self>
Parse from parameter.
Provided Methods§
Sourcefn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>(
iter: I,
) -> ParseResult<Self>
fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>
Parse from multiple parameters.
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.