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]

[src]

Create a new AddContext struct wrapping a value

Trait Implementations

impl<T: Debug, C: Debug> Debug for AddContext<T, C> where
    C: Default + Push<XSpanIdString>, 
[src]

[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]

Requests handled by the service

Responses given by the service

Errors produced by the service

The Service value created by this factory

[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]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

[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

impl<T, C> Sync for AddContext<T, C> where
    C: Sync,
    T: Sync