[][src]Trait reset_router::RequestExtensions

pub trait RequestExtensions {
    fn captures(&self) -> Option<Captures>;
fn state<S: Send + Sync + 'static>(&self) -> Option<Arc<S>>; 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 state<S: Send + Sync + 'static>(&self) -> Option<Arc<S>>

Copy of any state passed into the router builder using with_state

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...