[][src]Trait reset_router::RequestExtensions

pub trait RequestExtensions {
    fn captures(&self) -> Option<&Captures>;
fn data<T: Send + Sync + 'static>(&self) -> Option<Data<T>>; fn parsed_captures<C: FromCaptures>(&self) -> Result<C> { ... } }

Extensions to http::Request and http::request::Parts to support easy access to captures and State object

Required methods

fn captures(&self) -> Option<&Captures>

Any captures provided by the matching Regex for the current path

fn data<T: Send + Sync + 'static>(&self) -> Option<Data<T>>

Copy of any data passed into the router builder using data or wrapped_data

Loading content...

Provided methods

fn parsed_captures<C: FromCaptures>(&self) -> Result<C>

Positional captures parsed into FromStr types, in tuple format

Loading content...

Implementations on Foreign Types

impl RequestExtensions for Parts[src]

Loading content...

Implementors

impl RequestExtensions for Request[src]

Loading content...