Struct swagger::add_context::AddContext
[−]
[src]
pub struct AddContext<T, C> where
C: Default + Push<XSpanIdString>, { /* fields omitted */ }
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.
Methods
impl<T, C> AddContext<T, C> where
C: Default + Push<XSpanIdString>,
[src]
C: Default + Push<XSpanIdString>,
Trait Implementations
impl<T: Debug, C: Debug> Debug for AddContext<T, C> where
C: Default + Push<XSpanIdString>,
[src]
C: Default + Push<XSpanIdString>,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T, C> NewService for AddContext<T, C> where
C: Default + Push<XSpanIdString>,
T: NewService<Request = (Request, C::Result), Response = Response, Error = Error>,
[src]
C: Default + Push<XSpanIdString>,
T: NewService<Request = (Request, C::Result), Response = Response, Error = Error>,
type Request = Request
Requests handled by the service
type Response = Response
Responses given by the service
type Error = Error
Errors produced by the service
type Instance = AddContext<T::Instance, C>
The Service
value created by this factory
fn new_service(&self) -> Result<Self::Instance, Error>
[src]
Create and return a new service value.
impl<T, C> Service for AddContext<T, C> where
C: Default + Push<XSpanIdString>,
T: Service<Request = (Request, C::Result), Response = Response, Error = Error>,
[src]
C: Default + Push<XSpanIdString>,
T: Service<Request = (Request, C::Result), Response = Response, Error = Error>,
type Request = Request
Requests handled by the service.
type Response = Response
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = T::Future
The future response value.
fn call(&self, req: Self::Request) -> Self::Future
[src]
Process the request and return the response asynchronously.
Auto Trait Implementations
impl<T, C> Send for AddContext<T, C> where
C: Send,
T: Send,
C: Send,
T: Send,
impl<T, C> Sync for AddContext<T, C> where
C: Sync,
T: Sync,
C: Sync,
T: Sync,