Skip to main content

FromRequest

Trait FromRequest 

Source
pub trait FromRequest<P: ?Sized>: Sized {
    // Required method
    fn from_request<'a>(
        provider: &'a P,
        context: &'a mut InvocationContext,
        request: &'a HandleRequest,
    ) -> ExtractorFuture<'a, Self>;
}
Expand description

Extracts one typed handler argument from an inbound HTTP request.

Extractors may inspect the Endpoint provider, await explicitly bound Capability clients, and enrich the invocation context for later extractors and the handler. They must not perform the target Module’s final business authorization decision.

Required Methods§

Source

fn from_request<'a>( provider: &'a P, context: &'a mut InvocationContext, request: &'a HandleRequest, ) -> ExtractorFuture<'a, Self>

Extracts this value or rejects dispatch before the handler runs.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P, T> FromRequest<P> for Json<T>
where P: ?Sized, T: DeserializeOwned + 'static,

Source§

impl<P, T> FromRequest<P> for Path<T>
where P: ?Sized, T: DeserializeOwned + 'static,

Source§

impl<P, T> FromRequest<P> for Query<T>
where P: ?Sized, T: DeserializeOwned + 'static,

Source§

impl<P> FromRequest<P> for RequestId
where P: ?Sized,