Trait aws_smithy_http_server::request::FromParts

source ·
pub trait FromParts<Protocol>: Sized {
    type Rejection: IntoResponse<Protocol>;

    // Required method
    fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>;
}
Expand description

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

Required Associated Types§

source

type Rejection: IntoResponse<Protocol>

The type of the extraction failures.

Required Methods§

source

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

Extracts self from a Parts synchronously.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<P> FromParts<P> for ()

§

type Rejection = Infallible

source§

fn from_parts(_parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B> FromParts<P> for (A, B)
where A: FromParts<P>, B: FromParts<P>,

§

type Rejection = Two<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B, C> FromParts<P> for (A, B, C)
where A: FromParts<P>, B: FromParts<P>, C: FromParts<P>,

§

type Rejection = Three<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection, <C as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B, C, D> FromParts<P> for (A, B, C, D)
where A: FromParts<P>, B: FromParts<P>, C: FromParts<P>, D: FromParts<P>,

§

type Rejection = Four<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection, <C as FromParts<P>>::Rejection, <D as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B, C, D, E> FromParts<P> for (A, B, C, D, E)
where A: FromParts<P>, B: FromParts<P>, C: FromParts<P>, D: FromParts<P>, E: FromParts<P>,

§

type Rejection = Five<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection, <C as FromParts<P>>::Rejection, <D as FromParts<P>>::Rejection, <E as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B, C, D, E, F> FromParts<P> for (A, B, C, D, E, F)
where A: FromParts<P>, B: FromParts<P>, C: FromParts<P>, D: FromParts<P>, E: FromParts<P>, F: FromParts<P>,

§

type Rejection = Six<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection, <C as FromParts<P>>::Rejection, <D as FromParts<P>>::Rejection, <E as FromParts<P>>::Rejection, <F as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B, C, D, E, F, G> FromParts<P> for (A, B, C, D, E, F, G)
where A: FromParts<P>, B: FromParts<P>, C: FromParts<P>, D: FromParts<P>, E: FromParts<P>, F: FromParts<P>, G: FromParts<P>,

§

type Rejection = Seven<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection, <C as FromParts<P>>::Rejection, <D as FromParts<P>>::Rejection, <E as FromParts<P>>::Rejection, <F as FromParts<P>>::Rejection, <G as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, A, B, C, D, E, F, G, H> FromParts<P> for (A, B, C, D, E, F, G, H)
where A: FromParts<P>, B: FromParts<P>, C: FromParts<P>, D: FromParts<P>, E: FromParts<P>, F: FromParts<P>, G: FromParts<P>, H: FromParts<P>,

§

type Rejection = Eight<<A as FromParts<P>>::Rejection, <B as FromParts<P>>::Rejection, <C as FromParts<P>>::Rejection, <D as FromParts<P>>::Rejection, <E as FromParts<P>>::Rejection, <F as FromParts<P>>::Rejection, <G as FromParts<P>>::Rejection, <H as FromParts<P>>::Rejection>

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, T> FromParts<P> for Option<T>
where T: FromParts<P>,

§

type Rejection = Infallible

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, T> FromParts<P> for Result<T, T::Rejection>
where T: FromParts<P>,

§

type Rejection = Infallible

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

source§

impl<P, T> FromParts<P> for (T,)
where T: FromParts<P>,

§

type Rejection = <T as FromParts<P>>::Rejection

source§

fn from_parts(parts: &mut Parts) -> Result<Self, Self::Rejection>

Implementors§

source§

impl<P> FromParts<P> for ApiGatewayProxyRequestContext

Available on crate feature aws-lambda only.
source§

impl<P> FromParts<P> for ApiGatewayV2httpRequestContext

Available on crate feature aws-lambda only.
source§

impl<P> FromParts<P> for Context

Available on crate feature aws-lambda only.
source§

impl<P> FromParts<P> for ServerRequestId

Available on crate feature request-id only.
source§

impl<P, T> FromParts<P> for ConnectInfo<T>
where T: Send + Sync + 'static,

source§

impl<Protocol, T> FromParts<Protocol> for Extension<T>
where T: Send + Sync + 'static,