Struct ntex::http::h2::H2Service [−][src]
pub struct H2Service<T, S, B> { /* fields omitted */ }
Expand description
ServiceFactory
implementation for HTTP2 transport
Implementations
impl<S, B> H2Service<SslStream<TcpStream>, S, B> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]
impl<S, B> H2Service<SslStream<TcpStream>, S, B> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
[src]
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
[src]Create ssl based service
impl<S, B> H2Service<TlsStream<TcpStream>, S, B> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]
impl<S, B> H2Service<TlsStream<TcpStream>, S, B> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
[src]
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = SslError<DispatchError>, InitError = S::InitError>
[src]Create openssl based service
impl<S, B> H2Service<TcpStream, S, B> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]
impl<S, B> H2Service<TcpStream, S, B> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]pub fn tcp(
self
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = DispatchError, InitError = S::InitError>
[src]
pub fn tcp(
self
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = DispatchError, InitError = S::InitError>
[src]Create simple tcp based service
Trait Implementations
impl<T, S, B> ServiceFactory for H2Service<T, S, B> where
T: AsyncRead + AsyncWrite + Unpin + 'static,
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]
impl<T, S, B> ServiceFactory for H2Service<T, S, B> where
T: AsyncRead + AsyncWrite + Unpin + 'static,
S: ServiceFactory<Config = (), Request = Request>,
S::Error: ResponseError + 'static,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
<S::Service as Service>::Future: 'static,
B: MessageBody + 'static,
[src]type Request = (T, Option<SocketAddr>)
type Request = (T, Option<SocketAddr>)
Requests handled by the service.
type Error = DispatchError
type Error = DispatchError
Errors produced by the service
type Future = Pin<Box<dyn Future<Output = Result<Self::Service, Self::InitError>>>>
type Future = Pin<Box<dyn Future<Output = Result<Self::Service, Self::InitError>>>>
The future of the ServiceFactory
instance.
fn new_service(&self, _: ()) -> Self::Future
[src]
fn new_service(&self, _: ()) -> Self::Future
[src]Create and return a new service value asynchronously.
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R> where
F: FnMut(Self::Response) -> R + Clone,
[src]
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R> where
F: FnMut(Self::Response) -> R + Clone,
[src]Map this service’s output to a different type, returning a new service of the resulting type. Read more
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E> where
F: Fn(Self::Error) -> E + Clone,
[src]
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E> where
F: Fn(Self::Error) -> E + Clone,
[src]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,
[src]
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
F: Fn(Self::InitError) -> E + Clone,
[src]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> !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> where
B: Unpin,
S: Unpin,
T: Unpin,
B: Unpin,
S: Unpin,
T: Unpin,
impl<T, S, B> !UnwindSafe for H2Service<T, S, B>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> IntoServiceFactory<T> for T where
T: ServiceFactory,
[src]
impl<T> IntoServiceFactory<T> for T where
T: ServiceFactory,
[src]pub fn into_factory(self) -> T
[src]
pub fn into_factory(self) -> T
[src]Convert Self
to a ServiceFactory
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self