pub trait RequestExtensions {
// Required methods
fn captures(&self) -> Option<&Captures>;
fn data<T: Send + Sync + 'static>(&self) -> Option<Data<T>>;
// Provided method
fn parsed_captures<C: FromCaptures>(&self) -> Result<C> { ... }
}
Expand description
Extensions to http::Request
and http::request::Parts
to support easy access to captures and State
object
Required Methods§
Provided Methods§
Sourcefn parsed_captures<C: FromCaptures>(&self) -> Result<C>
fn parsed_captures<C: FromCaptures>(&self) -> Result<C>
Positional captures parsed into FromStr
types, in tuple format
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.