pub struct Layered<S, T> { /* private fields */ }
Expand description
A Service
created from a Handler
by applying a Tower middleware.
Created with Handler::layer
. See that method for more details.
Trait Implementations
impl<S, T, ReqBody, ResBody> Handler<T, ReqBody> for Layered<S, T> where
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
S::Error: IntoResponse,
S::Future: Send,
T: 'static,
ReqBody: Send + 'static,
ResBody: HttpBody<Data = Bytes> + Send + 'static,
ResBody::Error: Into<BoxError>,
impl<S, T, ReqBody, ResBody> Handler<T, ReqBody> for Layered<S, T> where
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
S::Error: IntoResponse,
S::Future: Send,
T: 'static,
ReqBody: Send + 'static,
ResBody: HttpBody<Data = Bytes> + Send + 'static,
ResBody::Error: Into<BoxError>,
Call the handler with the given request.
Apply a tower::Layer
to the handler. Read more
Convert the handler into a MakeService
. Read more
fn into_make_service_with_connect_info<C, Target>(
self
) -> IntoMakeServiceWithConnectInfo<IntoService<Self, T, B>, C> where
C: Connected<Target>,
fn into_make_service_with_connect_info<C, Target>(
self
) -> IntoMakeServiceWithConnectInfo<IntoService<Self, T, B>, C> where
C: Connected<Target>,
Convert the handler into a MakeService
which stores information
about the incoming connection. Read more
Auto Trait Implementations
impl<S, T> RefUnwindSafe for Layered<S, T> where
S: RefUnwindSafe,
impl<S, T> UnwindSafe for Layered<S, T> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Create a new Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more