pub trait Param<T>: Sized {
// Required method
fn from_request(req: &T) -> Result<Self, Error>;
}Expand description
Required Methods§
Sourcefn from_request(req: &T) -> Result<Self, Error>
fn from_request(req: &T) -> Result<Self, Error>
Construct param from request.
Error::Path should be returned when request’s path does not match.
Error::Method should be returned when request’s method does not
match.
Error::Prefix should not be returned. It’s used specifically by
mount
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.