Struct swagger::add_context::AddContextService
source · pub struct AddContextService<T, C>where
C: Default + Push<XSpanIdString>,
C::Result: Send + 'static,{ /* 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>where
C: Default + Push<XSpanIdString>,
C::Result: Send + 'static,
impl<T, C> AddContextService<T, C>where C: Default + Push<XSpanIdString>, C::Result: Send + 'static,
Trait Implementations§
source§impl<T: Debug, C> Debug for AddContextService<T, C>where
C: Default + Push<XSpanIdString> + Debug,
C::Result: Send + 'static,
impl<T: Debug, C> Debug for AddContextService<T, C>where C: Default + Push<XSpanIdString> + Debug, C::Result: Send + 'static,
source§impl<Inner, Context, Body> Service<Request<Body>> for AddContextService<Inner, Context>where
Context: Default + Push<XSpanIdString> + Send + 'static,
Context::Result: Send + 'static,
Inner: Service<(Request<Body>, Context::Result)>,
impl<Inner, Context, Body> Service<Request<Body>> for AddContextService<Inner, Context>where Context: Default + Push<XSpanIdString> + Send + 'static, Context::Result: Send + 'static, Inner: Service<(Request<Body>, Context::Result)>,
§type Response = <Inner as Service<(Request<Body>, <Context as Push<XSpanIdString>>::Result)>>::Response
type Response = <Inner as Service<(Request<Body>, <Context as Push<XSpanIdString>>::Result)>>::Response
Responses given by the service.
§type Error = <Inner as Service<(Request<Body>, <Context as Push<XSpanIdString>>::Result)>>::Error
type Error = <Inner as Service<(Request<Body>, <Context as Push<XSpanIdString>>::Result)>>::Error
Errors produced by the service.
§type Future = <Inner as Service<(Request<Body>, <Context as Push<XSpanIdString>>::Result)>>::Future
type Future = <Inner as Service<(Request<Body>, <Context as Push<XSpanIdString>>::Result)>>::Future
The future response value.
Auto Trait Implementations§
impl<T, C> RefUnwindSafe for AddContextService<T, C>where C: RefUnwindSafe, T: RefUnwindSafe,
impl<T, C> Send for AddContextService<T, C>where C: Send, T: Send,
impl<T, C> Sync for AddContextService<T, C>where C: Sync, T: Sync,
impl<T, C> Unpin for AddContextService<T, C>where C: Unpin, T: Unpin,
impl<T, C> UnwindSafe for AddContextService<T, C>where C: UnwindSafe, T: 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