Struct ntex::http::h2::H2Service [−][src]
pub struct H2Service<F, S, B> { /* fields omitted */ }
Expand description
ServiceFactory
implementation for HTTP2 transport
Implementations
impl<F, S, B> H2Service<SslFilter<F>, S, B> where
F: Filter,
S: ServiceFactory<Request> + 'static,
S::Error: ResponseError,
S::Response: Into<Response<B>>,
B: MessageBody + 'static,
impl<F, S, B> H2Service<SslFilter<F>, S, B> where
F: Filter,
S: ServiceFactory<Request> + 'static,
S::Error: ResponseError,
S::Response: Into<Response<B>>,
B: MessageBody + 'static,
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<Io<F>, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<Io<F>, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
Create ssl based service
impl<F, S, B> H2Service<TlsFilter<F>, S, B> where
F: Filter,
S: ServiceFactory<Request> + 'static,
S::Error: ResponseError,
S::Response: Into<Response<B>>,
B: MessageBody + 'static,
impl<F, S, B> H2Service<TlsFilter<F>, S, B> where
F: Filter,
S: ServiceFactory<Request> + 'static,
S::Error: ResponseError,
S::Response: Into<Response<B>>,
B: MessageBody + 'static,
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Io<F>, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Io<F>, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
Create openssl based service
Trait Implementations
impl<F, S, B> ServiceFactory<Io<F>, ()> for H2Service<F, S, B> where
F: Filter,
S: ServiceFactory<Request> + 'static,
S::Error: ResponseError,
S::Response: Into<Response<B>>,
B: MessageBody + 'static,
impl<F, S, B> ServiceFactory<Io<F>, ()> for H2Service<F, S, B> where
F: Filter,
S: ServiceFactory<Request> + 'static,
S::Error: ResponseError,
S::Response: Into<Response<B>>,
B: MessageBody + 'static,
type Error = DispatchError
type Error = DispatchError
Errors produced by the service
The future of the ServiceFactory
instance.
Create and return a new service value 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, Req, Cfg, F, E> where
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, 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<F, S, B> !RefUnwindSafe for H2Service<F, S, B>
impl<F, S, B> !UnwindSafe for H2Service<F, S, B>
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Self
to a ServiceFactory
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