Trait tokio::NewService [] [src]

pub trait NewService {
    type Req: Send + 'static;
    type Resp: Send + 'static;
    type Error: Send + 'static;
    type Item: Service<Req=Self::Req, Resp=Self::Resp, Error=Self::Error>;
    fn new_service(&self) -> Result<Self::Item>;
}

Creates new Service values.

Associated Types

type Req: Send + 'static

Requests handled by the service

type Resp: Send + 'static

Responses given by the service

type Error: Send + 'static

Errors produced by the service

type Item: Service<Req=Self::Req, Resp=Self::Resp, Error=Self::Error>

The Service value created by this factory

Required Methods

fn new_service(&self) -> Result<Self::Item>

Create and return a new service value.

Implementors