pub struct AddContextService<T, C> { /* private fields */ }
Expand description
Middleware wrapper service, that should be used as the outermost layer in a
stack of hyper services. Adds a context to a plain hyper::Request
that can be
used by subsequent layers in the stack. The AddContextService
struct should
not usually be used directly - when constructing a hyper stack use
AddContextMakeService
, which will create AddContextService
instances as needed.
Implementations§
Source§impl<T, C> AddContextService<T, C>
impl<T, C> AddContextService<T, C>
Trait Implementations§
Source§impl<T, C> Service<Request<Body>> for AddContextService<T, C>
impl<T, C> Service<Request<Body>> for AddContextService<T, C>
Source§type Response = <T as Service<ContextualPayload<<C as Push<XSpanId>>::Result>>>::Response
type Response = <T as Service<ContextualPayload<<C as Push<XSpanId>>::Result>>>::Response
Responses given by the service.
Source§type Error = <T as Service<ContextualPayload<<C as Push<XSpanId>>::Result>>>::Error
type Error = <T as Service<ContextualPayload<<C as Push<XSpanId>>::Result>>>::Error
Errors produced by the service.
Source§type Future = <T as Service<ContextualPayload<<C as Push<XSpanId>>::Result>>>::Future
type Future = <T as Service<ContextualPayload<<C as Push<XSpanId>>::Result>>>::Future
The future response value.
Auto Trait Implementations§
impl<T, C> Freeze for AddContextService<T, C>where
T: Freeze,
impl<T, C> RefUnwindSafe for AddContextService<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for AddContextService<T, C>
impl<T, C> Sync for AddContextService<T, C>
impl<T, C> Unpin for AddContextService<T, C>
impl<T, C> UnwindSafe for AddContextService<T, C>where
T: UnwindSafe,
C: 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