[][src]Trait tide::Extract

pub trait Extract<Data>: Send + Sized + 'static {
    type Fut: Future<Output = Result<Self, Response>> + Send + 'static;
    fn extract(
        data: &mut Data,
        req: &mut Request,
        params: &Option<RouteMatch>,
        store: &Store
    ) -> Self::Fut; }

An extractor for an app with Data

Associated Types

type Fut: Future<Output = Result<Self, Response>> + Send + 'static

The async result of extract.

The Err case represents that the endpoint should not be invoked, but rather the given response should be returned immediately.

Loading content...

Required methods

fn extract(
    data: &mut Data,
    req: &mut Request,
    params: &Option<RouteMatch>,
    store: &Store
) -> Self::Fut

Attempt to extract a value from the given request.

Loading content...

Implementors

impl<Data: 'static, T: Compute> Extract<Data> for Computed<T>[src]

type Fut = Ready<Result<Self, Response>>

impl<S, T> Extract<S> for ExtractConfiguration<T> where
    S: 'static,
    T: Any + Debug + Clone + Send + Sync + 'static, 
[src]

type Fut = FutureObj<'static, Result<Self, Response>>

impl<S, T> Extract<S> for UrlQuery<T> where
    T: Send + FromStr + 'static,
    S: 'static, 
[src]

type Fut = Ready<Result<Self, Response>>

impl<S: 'static> Extract<S> for Bytes[src]

type Fut = FutureObj<'static, Result<Self, Response>>

impl<S: 'static> Extract<S> for MultipartForm[src]

type Fut = FutureObj<'static, Result<Self, Response>>

impl<S: 'static> Extract<S> for Str[src]

type Fut = FutureObj<'static, Result<Self, Response>>

impl<S: 'static> Extract<S> for StrLossy[src]

type Fut = FutureObj<'static, Result<Self, Response>>

impl<S: 'static> Extract<S> for Cookies[src]

type Fut = Ready<Result<Self, Response>>

impl<T: NamedSegment, S: 'static> Extract<S> for Named<T>[src]

type Fut = Ready<Result<Self, Response>>

impl<T: Clone + Send + 'static> Extract<T> for AppData<T>[src]

type Fut = Ready<Result<Self, Response>>

impl<T: Send + 'static + FromStr, S: 'static> Extract<S> for Path<T>[src]

type Fut = Ready<Result<Self, Response>>

impl<T: Send + DeserializeOwned + 'static, S: 'static> Extract<S> for Json<T>[src]

type Fut = FutureObj<'static, Result<Self, Response>>

impl<T: Send + DeserializeOwned + 'static, S: 'static> Extract<S> for Form<T>[src]

type Fut = FutureObj<'static, Result<Self, Response>>

Loading content...