Trait wsrpc::Service[][src]

pub trait Service {
    type Req: DeserializeOwned;
    type Resp: Serialize + 'static;
    type Error: Serialize + 'static;
    type Ctx: Clone;
    fn serve(
        &self,
        ctx: Self::Ctx,
        req: Self::Req
    ) -> BoxStream<'static, Result<Self::Resp, Self::Error>>; fn boxed(self) -> BoxedService<Self::Ctx>
    where
        Self: Send + Sized + Sync + 'static
, { ... } }

Associated Types

Required methods

fn serve(
    &self,
    ctx: Self::Ctx,
    req: Self::Req
) -> BoxStream<'static, Result<Self::Resp, Self::Error>>
[src]

Provided methods

fn boxed(self) -> BoxedService<Self::Ctx> where
    Self: Send + Sized + Sync + 'static, 
[src]

Implementors