Struct ferrum::service::InitialService
[−]
[src]
pub struct InitialService<H> where
H: Handler, { pub handler: Arc<H>, pub thread_pool: Arc<CpuPool>, }
Fields
handler: Arc<H>
thread_pool: Arc<CpuPool>
Methods
impl<H> InitialService<H> where
H: Handler,
[src]
H: Handler,
fn new(handler: H, thread_pool_size: Option<usize>) -> InitialService<H>
[src]
Trait Implementations
impl<H> Clone for InitialService<H> where
H: Handler,
[src]
H: Handler,
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<H> NewService for InitialService<H> where
H: Handler,
[src]
H: Handler,
type Request = HyperRequest
Requests handled by the service
type Response = HyperResponse
Responses given by the service
type Error = HyperError
Errors produced by the service
type Instance = Self
The Service
value created by this factory
fn new_service(&self) -> Result<Self::Instance>
[src]
Create and return a new service value.
impl<H> Service for InitialService<H> where
H: Handler,
[src]
H: Handler,
type Request = HyperRequest
Requests handled by the service.
type Response = HyperResponse
Responses given by the service.
type Error = HyperError
Errors produced by the service.
type Future = CpuFuture<Self::Response, Self::Error>
The future response value.
fn call(&self, request: Self::Request) -> Self::Future
[src]
Process the request and return the response asynchronously.