Trait reset_router::RequestExtensions
source · pub trait RequestExtensions {
fn captures(&self) -> Option<Captures<'_>>;
fn parsed_captures<C: CaptureParsing>(&self) -> Result<C>;
fn state<S: Send + Sync + 'static>(&self) -> Option<Arc<S>>;
}Expand description
Extensions to http::Request to support easy access to captures and State object
Required Methods
fn captures(&self) -> Option<Captures<'_>>
fn parsed_captures<C: CaptureParsing>(&self) -> Result<C>
fn state<S: Send + Sync + 'static>(&self) -> Option<Arc<S>>
Implementations on Foreign Types
sourceimpl RequestExtensions for Request<Body>
impl RequestExtensions for Request<Body>
sourcefn captures(&self) -> Option<Captures<'_>>
fn captures(&self) -> Option<Captures<'_>>
Any captures provided by the matching Regex for the current path
sourcefn parsed_captures<C: CaptureParsing>(&self) -> Result<C>
fn parsed_captures<C: CaptureParsing>(&self) -> Result<C>
Captures parsed into FromStr types, in tuple format