pub struct H2Service<T, S, B> { /* private fields */ }
Expand description
ServiceFactory
implementation for HTTP2 transport
Implementations§
Trait Implementations§
Source§impl<T, S, B> ServiceFactory for H2Service<T, S, B>
impl<T, S, B> ServiceFactory for H2Service<T, S, B>
Source§type Request = (T, Option<SocketAddr>)
type Request = (T, Option<SocketAddr>)
Requests handled by the service.
Source§type Error = DispatchError
type Error = DispatchError
Errors produced by the service
Source§type InitError = <S as ServiceFactory>::InitError
type InitError = <S as ServiceFactory>::InitError
Errors produced while building a service.
Source§type Service = H2ServiceHandler<T, <S as ServiceFactory>::Service, B>
type Service = H2ServiceHandler<T, <S as ServiceFactory>::Service, B>
The
Service
value created by this factorySource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service value asynchronously.
Source§fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R>
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R>
Map this service’s output to a different type, returning a new service
of the resulting type.
Source§fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E>
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E>
Map this service’s error to a different error, returning a new service.
Source§fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E>
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E>
Map this factory’s init error to a different error, returning a new service.
Auto Trait Implementations§
impl<T, S, B> Freeze for H2Service<T, S, B>where
S: Freeze,
impl<T, S, B> !RefUnwindSafe for H2Service<T, S, B>
impl<T, S, B> !Send for H2Service<T, S, B>
impl<T, S, B> !Sync for H2Service<T, S, B>
impl<T, S, B> Unpin for H2Service<T, S, B>
impl<T, S, B> !UnwindSafe for H2Service<T, S, B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoServiceFactory<T> for Twhere
T: ServiceFactory,
impl<T> IntoServiceFactory<T> for Twhere
T: ServiceFactory,
Source§fn into_factory(self) -> T
fn into_factory(self) -> T
Convert
Self
to a ServiceFactory