pub struct Layered<M, H> { /* private fields */ }Expand description
A handler wrapped with middleware via a Layer.
Trait Implementations§
Source§impl<M: Middleware, H: Handler> Handler for Layered<M, H>
impl<M: Middleware, H: Handler> Handler for Layered<M, H>
Source§fn call<'a>(
&'a self,
ctx: &'a RequestContext,
req: &'a mut Request,
) -> BoxFuture<'a, Response>
fn call<'a>( &'a self, ctx: &'a RequestContext, req: &'a mut Request, ) -> BoxFuture<'a, Response>
Process a request and return a response.
Source§fn dependency_overrides(&self) -> Option<Arc<DependencyOverrides>>
fn dependency_overrides(&self) -> Option<Arc<DependencyOverrides>>
Optional dependency overrides to apply when building request contexts. Read more
Auto Trait Implementations§
impl<M, H> Freeze for Layered<M, H>
impl<M, H> RefUnwindSafe for Layered<M, H>where
M: RefUnwindSafe,
H: RefUnwindSafe,
impl<M, H> Send for Layered<M, H>
impl<M, H> Sync for Layered<M, H>
impl<M, H> Unpin for Layered<M, H>
impl<M, H> UnwindSafe for Layered<M, H>where
M: UnwindSafe,
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).