[][src]Struct i2cbus_api::server::context::NewAddContext

pub struct NewAddContext<T, A> { /* fields omitted */ }

Methods

impl<T, A, B, C, D> NewAddContext<T, A> where
    A: Default + Push<XSpanIdString, Result = B>,
    B: Push<Option<AuthData>, Result = C>,
    C: Push<Option<Authorization>, Result = D>,
    T: NewService<Request = (Request, D), Response = Response, Error = Error> + 'static, 
[src]

pub fn new(inner: T) -> NewAddContext<T, A>[src]

Trait Implementations

impl<T, A, B, C, D> NewService for NewAddContext<T, A> where
    A: Default + Push<XSpanIdString, Result = B>,
    B: Push<Option<AuthData>, Result = C>,
    C: Push<Option<Authorization>, Result = D>,
    T: NewService<Request = (Request, D), Response = Response, Error = Error> + 'static, 
[src]

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, A>

The Service value created by this factory

Auto Trait Implementations

impl<T, A> Send for NewAddContext<T, A> where
    A: Send,
    T: Send

impl<T, A> Sync for NewAddContext<T, A> where
    A: Sync,
    T: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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<T> Any for T where
    T: 'static + ?Sized
[src]

impl<F, R> NewService for F where
    F: Fn() -> Result<R, Error>,
    R: Service, 

type Request = <R as Service>::Request

Requests handled by the service

type Response = <R as Service>::Response

Responses given by the service

type Error = <R as Service>::Error

Errors produced by the service

type Instance = R

The Service value created by this factory

impl<T> Erased for T

impl<T, U, V, W> BoxedNewService for T where
    T: NewService<Request = U, Response = V, Error = W>,
    <T as NewService>::Instance: Service,
    <T as NewService>::Instance: 'static,
    <<T as NewService>::Instance as Service>::Future == Box<dyn Future<Item = V, Error = W> + 'static>, 
[src]

fn boxed_new_service(
    &self
) -> Result<Box<dyn Service<Future = Box<dyn Future<Item = V, Error = W> + 'static>, Response = V, Request = U, Error = W> + 'static>, Error>
[src]

Call the new_service method of the wrapped NewService and Box the result