Trait hyper::service::NewService [−][src]
pub trait NewService { type ReqBody: Payload; type ResBody: Payload; type Error: Into<Box<StdError + Send + Sync>>; type Service: Service<ReqBody = Self::ReqBody, ResBody = Self::ResBody, Error = Self::Error>; type Future: Future<Item = Self::Service, Error = Self::InitError>; type InitError: Into<Box<StdError + Send + Sync>>; fn new_service(&self) -> Self::Future; }
An asynchronous constructor of Service
s.
Associated Types
type ReqBody: Payload
The Payload
body of the http::Request
.
type ResBody: Payload
The Payload
body of the http::Response
.
type Error: Into<Box<StdError + Send + Sync>>
The error type that can be returned by Service
s.
type Service: Service<ReqBody = Self::ReqBody, ResBody = Self::ResBody, Error = Self::Error>
The resolved Service
from new_service()
.
type Future: Future<Item = Self::Service, Error = Self::InitError>
The future returned from new_service
of a Service
.
type InitError: Into<Box<StdError + Send + Sync>>
The error type that can be returned when creating a new Service
.
Required Methods
fn new_service(&self) -> Self::Future
Create a new Service
.