Trait aws_smithy_http_server::request::FromRequest

source ·
pub trait FromRequest<Protocol, B>: Sized {
    type Rejection: IntoResponse<Protocol>;
    type Future: Future<Output = Result<Self, Self::Rejection>>;

    // Required method
    fn from_request(request: Request<B>) -> Self::Future;
}
Expand description

Provides a protocol aware extraction from a Request. This consumes the Request, including the body, in contrast to FromParts which borrows the Parts.

This should not be implemented by hand. Code generation should implement this for your operations input. To extract items from a HTTP request FromParts should be used.

Required Associated Types§

source

type Rejection: IntoResponse<Protocol>

The type of the extraction failures.

source

type Future: Future<Output = Result<Self, Self::Rejection>>

The type of the extraction Future.

Required Methods§

source

fn from_request(request: Request<B>) -> Self::Future

Extracts self from a Request asynchronously.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<P, B, T1> FromRequest<P, B> for (T1,)
where T1: FromRequest<P, B>,

§

type Rejection = <T1 as FromRequest<P, B>>::Rejection

§

type Future = MapOk<<T1 as FromRequest<P, B>>::Future, fn(_: T1) -> (T1,)>

source§

fn from_request(request: Request<B>) -> Self::Future

source§

impl<P, B, T1, T2> FromRequest<P, B> for (T1, T2)
where T1: FromRequest<P, B>, T2: FromParts<P>, T1::Rejection: Display, T2::Rejection: Display,

§

type Rejection = Two<<T1 as FromRequest<P, B>>::Rejection, <T2 as FromParts<P>>::Rejection>

§

type Future = TryJoin<MapErr<<T1 as FromRequest<P, B>>::Future, fn(_: <T1 as FromRequest<P, B>>::Rejection) -> <(T1, T2) as FromRequest<P, B>>::Rejection>, Ready<Result<T2, <(T1, T2) as FromRequest<P, B>>::Rejection>>>

source§

fn from_request(request: Request<B>) -> Self::Future

Implementors§