[][src]Struct swagger::add_context::AddContextService

pub struct AddContextService<T, C> where
    C: Default + Push<XSpanIdString>,
    C::Result: Send + 'static, 
{ /* 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. The AddContextService struct should not usually be used directly - when constructing a hyper stack use AddContextMakeService, which will create AddContextService instances as needed.

Methods

impl<T, C> AddContextService<T, C> where
    C: Default + Push<XSpanIdString>,
    C::Result: Send + 'static, 
[src]

pub fn new(inner: T) -> Self[src]

Create a new AddContextService struct wrapping a value

Trait Implementations

impl<T: Debug, C: Debug> Debug for AddContextService<T, C> where
    C: Default + Push<XSpanIdString>,
    C::Result: Send + 'static, 
[src]

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)>, 
[src]

type Response = Inner::Response

Responses given by the service.

type Error = Inner::Error

Errors produced by the service.

type Future = Inner::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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,