pub struct H1Service<H, Io>where
H: HttpHandler,
Io: IoStream,{ /* private fields */ }
Expand description
NewService
implementation for HTTP1 transport
Implementations§
source§impl<H, Io> H1Service<H, Io>where
H: HttpHandler,
Io: IoStream,
impl<H, Io> H1Service<H, Io>where
H: HttpHandler,
Io: IoStream,
sourcepub fn new(settings: ServiceConfig<H>) -> H1Service<H, Io>
pub fn new(settings: ServiceConfig<H>) -> H1Service<H, Io>
Create new HttpService
instance.
Trait Implementations§
source§impl<H, Io> NewService for H1Service<H, Io>where
H: HttpHandler,
Io: IoStream,
impl<H, Io> NewService for H1Service<H, Io>where
H: HttpHandler,
Io: IoStream,
§type Error = HttpDispatchError
type Error = HttpDispatchError
Errors produced by the service
§type Future = FutureResult<<H1Service<H, Io> as NewService>::Service, <H1Service<H, Io> as NewService>::InitError>
type Future = FutureResult<<H1Service<H, Io> as NewService>::Service, <H1Service<H, Io> as NewService>::InitError>
The future of the
Service
instance.source§fn new_service(&self) -> <H1Service<H, Io> as NewService>::Future
fn new_service(&self) -> <H1Service<H, Io> as NewService>::Future
Create and return a new service value asynchronously.
Auto Trait Implementations§
impl<H, Io> !RefUnwindSafe for H1Service<H, Io>
impl<H, Io> !Send for H1Service<H, Io>
impl<H, Io> !Sync for H1Service<H, Io>
impl<H, Io> Unpin for H1Service<H, Io>where
Io: Unpin,
impl<H, Io> !UnwindSafe for H1Service<H, Io>
Blanket Implementations§
§impl<T> IntoNewService<T> for Twhere
T: NewService,
impl<T> IntoNewService<T> for Twhere
T: NewService,
§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewService
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more§impl<T> NewServiceExt for Twhere
T: NewService + ?Sized,
impl<T> NewServiceExt for Twhere
T: NewService + ?Sized,
fn apply<S, I, F, R>(
self,
service: I,
f: F
) -> AndThenNewService<Self, ApplyNewService<S, F, R, Self::Response>>where
Self: Sized,
S: NewService<InitError = Self::InitError>,
<S as NewService>::Error: Into<<<R as IntoFuture>::Future as Future>::Error>,
I: IntoNewService<S>,
F: Fn(Self::Response, &mut <S as NewService>::Service) -> R + Clone,
R: IntoFuture<Error = Self::Error>,
fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Self::Response, Error = Self::Error, InitError = Self::InitError>,
§fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
NewService
that create service to map this service’s error
and new service’s init error to any error
implementing From
for this services
Error`. Read more§fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
Create
NewService
to chain on a computation for when a call to the
service finished, passing the result of the call to the next
service B
. Read more