Struct actix_tls::connect::Connection
source · pub struct Connection<R, IO> { /* private fields */ }
Available on crate feature
connect
only.Expand description
Wraps underlying I/O and the connection request that initiated it.
Implementations§
source§impl<R, IO> Connection<R, IO>
impl<R, IO> Connection<R, IO>
source§impl<R, IO> Connection<R, IO>
impl<R, IO> Connection<R, IO>
sourcepub fn into_parts(self) -> (IO, R)
pub fn into_parts(self) -> (IO, R)
Deconstructs into IO and request parts.
sourcepub fn replace_io<IO2>(self, io: IO2) -> (IO, Connection<R, IO2>)
pub fn replace_io<IO2>(self, io: IO2) -> (IO, Connection<R, IO2>)
Replaces underlying IO, returning old IO and new Connection
.
Trait Implementations§
source§impl<R, IO> Deref for Connection<R, IO>
impl<R, IO> Deref for Connection<R, IO>
source§impl<R, IO> DerefMut for Connection<R, IO>
impl<R, IO> DerefMut for Connection<R, IO>
source§impl<R, IO> Service<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature native-tls
only.
impl<R, IO> Service<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature
native-tls
only.The native-tls
connector is both it’s ServiceFactory and Service impl type.
As the factory and service share the same type and state.
§type Response = Connection<R, TlsStream<IO>>
type Response = Connection<R, TlsStream<IO>>
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<TlsConnector as Service<Connection<R, IO>>>::Response, <TlsConnector as Service<Connection<R, IO>>>::Error>>>>
type Future = Pin<Box<dyn Future<Output = Result<<TlsConnector as Service<Connection<R, IO>>>::Response, <TlsConnector as Service<Connection<R, IO>>>::Error>>>>
The future response value.
source§impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate features rustls-0_20-webpki-roots
or rustls-0_20-native-roots
only.
impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate features
rustls-0_20-webpki-roots
or rustls-0_20-native-roots
only.source§impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate features rustls-0_21-webpki-roots
or rustls-0_21-native-roots
only.
impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate features
rustls-0_21-webpki-roots
or rustls-0_21-native-roots
only.source§impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate feature rustls-0_22
only.
impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate feature
rustls-0_22
only.source§impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate feature rustls-0_23
only.
impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate feature
rustls-0_23
only.source§impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate feature openssl
only.
impl<R, IO> Service<Connection<R, IO>> for TlsConnectorServicewhere
R: Host,
IO: ActixStream,
Available on crate feature
openssl
only.source§impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature openssl
only.
impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature
openssl
only.§type Response = Connection<R, SslStream<IO>>
type Response = Connection<R, SslStream<IO>>
Responses given by the created services.
§type Service = TlsConnectorService
type Service = TlsConnectorService
The kind of
Service
created by this factory.§type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
source§impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate features rustls-0_21-webpki-roots
or rustls-0_21-native-roots
only.
impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate features
rustls-0_21-webpki-roots
or rustls-0_21-native-roots
only.§type Response = Connection<R, TlsStream<IO>>
type Response = Connection<R, TlsStream<IO>>
Responses given by the created services.
§type Service = TlsConnectorService
type Service = TlsConnectorService
The kind of
Service
created by this factory.§type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
source§impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature rustls-0_22
only.
impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature
rustls-0_22
only.§type Response = Connection<R, TlsStream<IO>>
type Response = Connection<R, TlsStream<IO>>
Responses given by the created services.
§type Service = TlsConnectorService
type Service = TlsConnectorService
The kind of
Service
created by this factory.§type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
source§impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate features rustls-0_20-webpki-roots
or rustls-0_20-native-roots
only.
impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate features
rustls-0_20-webpki-roots
or rustls-0_20-native-roots
only.§type Response = Connection<R, TlsStream<IO>>
type Response = Connection<R, TlsStream<IO>>
Responses given by the created services.
§type Service = TlsConnectorService
type Service = TlsConnectorService
The kind of
Service
created by this factory.§type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
source§impl<R: Host, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
IO: ActixStream + 'static,
Available on crate feature native-tls
only.
impl<R: Host, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
IO: ActixStream + 'static,
Available on crate feature
native-tls
only.§type Response = Connection<R, TlsStream<IO>>
type Response = Connection<R, TlsStream<IO>>
Responses given by the created services.
§type Service = TlsConnector
type Service = TlsConnector
The kind of
Service
created by this factory.§type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
source§impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature rustls-0_23
only.
impl<R, IO> ServiceFactory<Connection<R, IO>> for TlsConnectorwhere
R: Host,
IO: ActixStream + 'static,
Available on crate feature
rustls-0_23
only.§type Response = Connection<R, TlsStream<IO>>
type Response = Connection<R, TlsStream<IO>>
Responses given by the created services.
§type Service = TlsConnectorService
type Service = TlsConnectorService
The kind of
Service
created by this factory.§type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
type Future = Ready<Result<<TlsConnector as ServiceFactory<Connection<R, IO>>>::Service, <TlsConnector as ServiceFactory<Connection<R, IO>>>::InitError>>
The future of the
Service
instance.gsource§fn new_service(&self, _: ()) -> Self::Future
fn new_service(&self, _: ()) -> Self::Future
Create and return a new service asynchronously.
Auto Trait Implementations§
impl<R, IO> Freeze for Connection<R, IO>
impl<R, IO> RefUnwindSafe for Connection<R, IO>where
R: RefUnwindSafe,
IO: RefUnwindSafe,
impl<R, IO> Send for Connection<R, IO>
impl<R, IO> Sync for Connection<R, IO>
impl<R, IO> Unpin for Connection<R, IO>
impl<R, IO> UnwindSafe for Connection<R, IO>where
R: UnwindSafe,
IO: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more