Struct actix_http::h1::H1Service [−][src]
pub struct H1Service<T, S, B, X = ExpectHandler, U = UpgradeHandler<T>> { /* fields omitted */ }
Expand description
ServiceFactory
implementation for HTTP1 transport
Implementations
impl<S, B, X, U> H1Service<TlsStream<TcpStream>, S, B, X, U> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Config = (), Request = Request, Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<Config = (), Request = (Request, Framed<TlsStream<TcpStream>, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
impl<S, B, X, U> H1Service<TlsStream<TcpStream>, S, B, X, U> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Config = (), Request = Request, Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<Config = (), Request = (Request, Framed<TlsStream<TcpStream>, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = TlsError<Error, DispatchError>, InitError = ()>
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = TlsError<Error, DispatchError>, InitError = ()>
Create rustls based service
impl<S, B, X, U> H1Service<TcpStream, S, B, X, U> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Config = (), Request = Request, Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<Config = (), Request = (Request, Framed<TcpStream, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
impl<S, B, X, U> H1Service<TcpStream, S, B, X, U> where
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Config = (), Request = Request, Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<Config = (), Request = (Request, Framed<TcpStream, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
pub fn tcp(
self
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = DispatchError, InitError = ()>
pub fn tcp(
self
) -> impl ServiceFactory<Config = (), Request = TcpStream, Response = (), Error = DispatchError, InitError = ()>
Create simple tcp stream service
Trait Implementations
impl<T, S, B, X, U> ServiceFactory for H1Service<T, S, B, X, U> where
T: AsyncRead + AsyncWrite + Unpin,
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
S::InitError: Debug,
B: MessageBody,
X: ServiceFactory<Config = (), Request = Request, Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<Config = (), Request = (Request, Framed<T, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
impl<T, S, B, X, U> ServiceFactory for H1Service<T, S, B, X, U> where
T: AsyncRead + AsyncWrite + Unpin,
S: ServiceFactory<Config = (), Request = Request>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
S::InitError: Debug,
B: MessageBody,
X: ServiceFactory<Config = (), Request = Request, Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<Config = (), Request = (Request, Framed<T, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
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 Service = H1ServiceHandler<T, S::Service, B, X::Service, U::Service>
type Service = H1ServiceHandler<T, S::Service, B, X::Service, U::Service>
The kind of Service
created by this factory.
type Future = H1ServiceResponse<T, S, B, X, U>
type Future = H1ServiceResponse<T, S, B, X, U>
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, X = ExpectHandler, U = UpgradeHandler<T>> !RefUnwindSafe for H1Service<T, S, B, X, U>
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler<T>> !Send for H1Service<T, S, B, X, U>
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler<T>> !Sync for H1Service<T, S, B, X, U>
impl<T, S, B, X, U> Unpin for H1Service<T, S, B, X, U> where
B: Unpin,
S: Unpin,
T: Unpin,
U: Unpin,
X: Unpin,
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler<T>> !UnwindSafe for H1Service<T, S, B, X, U>
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
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