[][src]Struct tide::middleware::RequestContext

pub struct RequestContext<'a, Data> {
    pub app_data: Data,
    pub req: Request,
    pub params: Option<RouteMatch<'a>>,
    // some fields omitted
}

Fields

app_data: Datareq: Requestparams: Option<RouteMatch<'a>>

Methods

impl<'a, Data: Clone + Send> RequestContext<'a, Data>[src]

pub fn get_item<T: Any + Debug + Clone + Send + Sync>(&self) -> Option<&T>[src]

Get a configuration item of given type from the endpoint.

pub fn store(&self) -> &Store[src]

Get the configuration store for this request.

This is for debug purposes. Store implements Debug, so the store can be inspected using {:?} formatter.

pub fn next(self) -> FutureObj<'a, Response>[src]

Consume this context, and run remaining middleware chain to completion.

Auto Trait Implementations

impl<'a, Data> Send for RequestContext<'a, Data> where
    Data: Send

impl<'a, Data> !Sync for RequestContext<'a, Data>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Erased for T