[][src]Struct i2cbus_api::server::NewService

pub struct NewService<T, C> { /* fields omitted */ }

Methods

impl<T, C> NewService<T, C> where
    T: Api<C> + Clone + 'static,
    C: Has<XSpanIdString> + 'static, 
[src]

pub fn new<U: Into<Arc<T>>>(api_impl: U) -> NewService<T, C>[src]

Trait Implementations

impl<T, C> NewService for NewService<T, C> where
    T: Api<C> + Clone + 'static,
    C: Has<XSpanIdString> + 'static, 
[src]

type Request = (Request, C)

Requests handled by the service

type Response = Response

Responses given by the service

type Error = Error

Errors produced by the service

type Instance = Service<T, C>

The Service value created by this factory

Auto Trait Implementations

impl<T, C> Send for NewService<T, C> where
    C: Send,
    T: Send + Sync

impl<T, C> Sync for NewService<T, C> where
    C: Sync,
    T: Send + 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