[][src]Struct i2cbus::NewService

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

Methods

impl<C> NewService<C>[src]

pub fn new() -> Self[src]

Trait Implementations

impl<C> NewService for NewService<C> where
    C: Has<XSpanIdString> + Clone + '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<Server<C>, C>

The Service value created by this factory

fn new_service(&self) -> Result<Self::Instance>[src]

Instantiate a new server.

Auto Trait Implementations

impl<C> Send for NewService<C> where
    C: Send

impl<C> Sync for NewService<C> where
    C: 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