[][src]Trait hyper::server::NewService

pub trait NewService where
    <Self::Instance as Service>::Request == Self::Request,
    <Self::Instance as Service>::Response == Self::Response,
    <Self::Instance as Service>::Error == Self::Error
{ type Request; type Response; type Error; type Instance: Service; fn new_service(&self) -> Result<Self::Instance, Error>; }

Creates new Service values.

Associated Types

type Request

Requests handled by the service

type Response

Responses given by the service

type Error

Errors produced by the service

type Instance: Service

The Service value created by this factory

Loading content...

Required methods

fn new_service(&self) -> Result<Self::Instance, Error>

Create and return a new service value.

Loading content...

Implementations on Foreign Types

impl<S> NewService for Arc<S> where
    S: NewService + ?Sized
[src]

type Request = <S as NewService>::Request

type Response = <S as NewService>::Response

type Error = <S as NewService>::Error

type Instance = <S as NewService>::Instance

impl<S> NewService for Rc<S> where
    S: NewService + ?Sized
[src]

type Request = <S as NewService>::Request

type Response = <S as NewService>::Response

type Error = <S as NewService>::Error

type Instance = <S as NewService>::Instance

Loading content...

Implementors

impl<F, R> NewService for F where
    F: Fn() -> Result<R, Error>,
    R: Service
[src]

type Request = <R as Service>::Request

type Response = <R as Service>::Response

type Error = <R as Service>::Error

type Instance = R

Loading content...