Struct actix_http::h2::H2Service [−][src]
pub struct H2Service<T, S, B> { /* fields omitted */ }
Expand description
ServiceFactory
implementation for HTTP/2 transport
Implementations
impl<S, B> H2Service<TlsStream<TcpStream>, S, B> where
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
impl<S, B> H2Service<TlsStream<TcpStream>, S, B> where
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<SslError, DispatchError>, InitError = S::InitError>
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<SslError, DispatchError>, InitError = S::InitError>
Create OpenSSL based service.
impl<S, B> H2Service<TlsStream<TcpStream>, S, B> where
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
impl<S, B> H2Service<TlsStream<TcpStream>, S, B> where
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
Create Rustls based service.
impl<S, B> H2Service<TcpStream, S, B> where
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
impl<S, B> H2Service<TcpStream, S, B> where
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
pub fn tcp(
self
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = DispatchError, InitError = S::InitError>
pub fn tcp(
self
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = DispatchError, InitError = S::InitError>
Create plain TCP based service
Trait Implementations
impl<T, S, B> ServiceFactory<(T, Option<SocketAddr>)> for H2Service<T, S, B> where
T: AsyncRead + AsyncWrite + Unpin + 'static,
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
impl<T, S, B> ServiceFactory<(T, Option<SocketAddr>)> for H2Service<T, S, B> where
T: AsyncRead + AsyncWrite + Unpin + 'static,
S: ServiceFactory<Request, Config = ()>,
S::Future: 'static,
S::Error: Into<Response<AnyBody>> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service<Request>>::Future: 'static,
B: MessageBody + 'static,
B::Error: Into<Box<dyn StdError>>,
type Error = DispatchError
type Error = DispatchError
Errors produced by the created services.
type Future = LocalBoxFuture<'static, Result<Self::Service, Self::InitError>>
type Future = LocalBoxFuture<'static, Result<Self::Service, Self::InitError>>
The future of the Service
instance.g
Create and return a new service asynchronously.
Auto Trait Implementations
impl<T, S, B> !RefUnwindSafe for H2Service<T, S, B>
impl<T, S, B> !UnwindSafe for H2Service<T, S, B>
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Self
to a ServiceFactory
Map this service’s output to a different type, returning a new service of the resulting type. Read more
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> where
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, Req, E> where
F: Fn(Self::InitError) -> E + Clone,
Map this factory’s init error to a different error, returning a new service.
Call another service after call to this one has resolved successfully.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more