Struct actix_http::h2::H2Service [−][src]
pub struct H2Service<T, S, B> { /* fields omitted */ }Expand description
ServiceFactory implementation for HTTP2 transport
Implementations
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = TlsError<HandshakeError<TcpStream>, DispatchError>, InitError = S::InitError>
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = TlsError<HandshakeError<TcpStream>, DispatchError>, InitError = S::InitError>
Create ssl based service
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = TlsError<Error, DispatchError>, InitError = S::InitError>
Create openssl based service
pub fn tcp(
self
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = DispatchError, InitError = S::InitError>
pub fn tcp(
self
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = DispatchError, InitError = S::InitError>
Create simple tcp based service
Trait Implementations
impl<T, S, B> ServiceFactory for H2Service<T, S, B> where
T: AsyncRead + AsyncWrite + Unpin,
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
impl<T, S, B> ServiceFactory for H2Service<T, S, B> where
T: AsyncRead + AsyncWrite + Unpin,
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error> + 'static,
S::Response: Into<Response<B>> + 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
type Request = (T, Option<SocketAddr>)
type Request = (T, Option<SocketAddr>)
Requests handled by the created services.
type Error = DispatchError
type Error = DispatchError
Errors produced by the created services.
type Future = H2ServiceResponse<T, S, B>
type Future = H2ServiceResponse<T, S, B>
The future of the Service instance.
Create and return a new service asynchronously.
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, E> where
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
F: Fn(Self::InitError) -> E + Clone,
Map this factory’s init error to a different error, returning a new service.
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
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Convert Self to a ServiceFactory
type Output = T
type Output = T
Should always be Self