Struct actix_http::h2::H2Service
source · pub struct H2Service<T, S, B> { /* private fields */ }
Available on crate feature
http2
only.Expand description
ServiceFactory
implementation for HTTP/2 transport
Implementations§
source§impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
sourcepub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<SslError, DispatchError>, InitError = S::InitError>
Available on crate feature openssl
only.
pub fn openssl( self, acceptor: SslAcceptor ) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<SslError, DispatchError>, InitError = S::InitError>
openssl
only.Create OpenSSL based service.
source§impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
sourcepub fn rustls_021(
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
Available on crate feature rustls-0_21
only.
pub fn rustls_021( self, config: ServerConfig ) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
rustls-0_21
only.Create Rustls v0.21 based service.
source§impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
sourcepub fn rustls_0_22(
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
Available on crate feature rustls-0_22
only.
pub fn rustls_0_22( self, config: ServerConfig ) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
rustls-0_22
only.Create Rustls v0.22 based service.
source§impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
sourcepub fn rustls_0_23(
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
Available on crate feature rustls-0_23
only.
pub fn rustls_0_23( self, config: ServerConfig ) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
rustls-0_23
only.Create Rustls v0.23 based service.
Trait Implementations§
source§impl<T, S, B> ServiceFactory<(T, Option<SocketAddr>)> for H2Service<T, S, B>
impl<T, S, B> ServiceFactory<(T, Option<SocketAddr>)> for H2Service<T, S, B>
§type Error = DispatchError
type Error = DispatchError
Errors produced by the created services.
§type Service = H2ServiceHandler<T, <S as ServiceFactory<Request>>::Service, B>
type Service = H2ServiceHandler<T, <S as ServiceFactory<Request>>::Service, B>
The kind of
Service
created by this factory.§type InitError = <S as ServiceFactory<Request>>::InitError
type InitError = <S as ServiceFactory<Request>>::InitError
Errors potentially raised while building a service.
§type Future = Pin<Box<dyn Future<Output = Result<<H2Service<T, S, B> as ServiceFactory<(T, Option<SocketAddr>)>>::Service, <H2Service<T, S, B> as ServiceFactory<(T, Option<SocketAddr>)>>::InitError>>>>
type Future = Pin<Box<dyn Future<Output = Result<<H2Service<T, S, B> as ServiceFactory<(T, Option<SocketAddr>)>>::Service, <H2Service<T, S, B> as ServiceFactory<(T, Option<SocketAddr>)>>::InitError>>>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<SF, Req> IntoServiceFactory<SF, Req> for SFwhere
SF: ServiceFactory<Req>,
impl<SF, Req> IntoServiceFactory<SF, Req> for SFwhere
SF: ServiceFactory<Req>,
§fn into_factory(self) -> SF
fn into_factory(self) -> SF
Convert
Self
to a ServiceFactory
§impl<SF, Req> ServiceFactoryExt<Req> for SFwhere
SF: ServiceFactory<Req>,
impl<SF, Req> ServiceFactoryExt<Req> for SFwhere
SF: ServiceFactory<Req>,
§fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, Req, R>
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, Req, R>
Map this service’s output to a different type, returning a new service
of the resulting type.
§fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, F, E>
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, F, E>
Map this service’s error to a different error, returning a new service.
§fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, Req, E>
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, Req, E>
Map this factory’s init error to a different error, returning a new service.