Struct actix_http::h1::H1Service [−][src]
ServiceFactory
implementation for HTTP1 transport
Implementations
impl<S, B, X, U> H1Service<TlsStream<TcpStream>, S, B, X, U> where
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<TlsStream<TcpStream>, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
[src]
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<TlsStream<TcpStream>, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
pub fn openssl(
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<SslError, DispatchError>, InitError = ()>
[src]
self,
acceptor: SslAcceptor
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<SslError, DispatchError>, InitError = ()>
Create openssl based service
impl<S, B, X, U> H1Service<TlsStream<TcpStream>, S, B, X, U> where
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<TlsStream<TcpStream>, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
[src]
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<TlsStream<TcpStream>, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
pub fn rustls(
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = ()>
[src]
self,
config: ServerConfig
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = TlsError<Error, DispatchError>, InitError = ()>
Create rustls based service
impl<S, B, X, U> H1Service<TcpStream, S, B, X, U> where
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<TcpStream, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
[src]
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::InitError: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<TcpStream, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
pub fn tcp(
self
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = DispatchError, InitError = ()>
[src]
self
) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = DispatchError, InitError = ()>
Create simple tcp stream service
impl<T, S, B, X, U> H1Service<T, S, B, X, U> where
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
S::InitError: Debug,
B: MessageBody,
[src]
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
S::InitError: Debug,
B: MessageBody,
pub fn expect<X1>(self, expect: X1) -> H1Service<T, S, B, X1, U> where
X1: ServiceFactory<Request, Response = Request>,
X1::Error: Into<Error>,
X1::InitError: Debug,
[src]
X1: ServiceFactory<Request, Response = Request>,
X1::Error: Into<Error>,
X1::InitError: Debug,
pub fn upgrade<U1>(self, upgrade: Option<U1>) -> H1Service<T, S, B, X, U1> where
U1: ServiceFactory<(Request, Framed<T, Codec>), Response = ()>,
U1::Error: Display,
U1::InitError: Debug,
[src]
U1: ServiceFactory<(Request, Framed<T, Codec>), Response = ()>,
U1::Error: Display,
U1::InitError: Debug,
Trait Implementations
impl<T, S, B, X, U> ServiceFactory<(T, Option<SocketAddr>)> for H1Service<T, S, B, X, U> where
T: AsyncRead + AsyncWrite + Unpin,
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
S::InitError: Debug,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<T, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
[src]
T: AsyncRead + AsyncWrite + Unpin,
S: ServiceFactory<Request, Config = ()>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
S::InitError: Debug,
B: MessageBody,
X: ServiceFactory<Request, Config = (), Response = Request>,
X::Error: Into<Error>,
X::InitError: Debug,
U: ServiceFactory<(Request, Framed<T, Codec>), Config = (), Response = ()>,
U::Error: Display + Into<Error>,
U::InitError: Debug,
type Response = ()
Responses given by the created services.
type Error = DispatchError
Errors produced by the created services.
type Config = ()
Service factory configuration.
type Service = H1ServiceHandler<T, S::Service, B, X::Service, U::Service>
The kind of Service
created by this factory.
type InitError = ()
Errors potentially raised while building a service.
type Future = H1ServiceResponse<T, S, B, X, U>
The future of the Service
instance.
fn new_service(&self, _: ()) -> Self::Future
[src]
Auto Trait Implementations
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler> !RefUnwindSafe for H1Service<T, S, B, X, U>
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler> !Send for H1Service<T, S, B, X, U>
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler> !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,
U: Unpin,
X: Unpin,
B: Unpin,
S: Unpin,
U: Unpin,
X: Unpin,
impl<T, S, B, X = ExpectHandler, U = UpgradeHandler> !UnwindSafe for H1Service<T, S, B, X, U>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<SF, Req> IntoServiceFactory<SF, Req> for SF where
SF: ServiceFactory<Req>,
[src]
SF: ServiceFactory<Req>,
pub fn into_factory(self) -> SF
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<S, Req> ServiceFactoryExt<Req> for S where
S: ServiceFactory<Req>,
[src]
S: ServiceFactory<Req>,
pub fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, Req, R> where
F: FnMut(Self::Response) -> R + Clone,
[src]
F: FnMut(Self::Response) -> R + Clone,
pub fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, F, E> where
F: Fn(Self::Error) -> E + Clone,
[src]
F: Fn(Self::Error) -> E + Clone,
pub fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, Req, E> where
F: Fn(Self::InitError) -> E + Clone,
[src]
F: Fn(Self::InitError) -> E + Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,