Trait tls_api::TlsConnector [−][src]
A builder for client-side TLS connections.
Associated Types
type Builder: TlsConnectorBuilder<Connector = Self>
[src]
Type of the builder for this connector.
type Underlying
[src]
Type of the underlying connector.
type TlsStream: TlsStreamDyn
[src]
crate::TlsStream<tls_api::AsyncSocketBox>
.
In the world of HKT this would be:
type TlsStream<S: TlsStreamDyn> : TlsStreamWithSocketDyn<S>;
Associated Constants
const IMPLEMENTED: bool
[src]
Is it implemented? When false
all operations return an error.
At the moment of writing, there are two crates which return false
here:
tls-api-stub
, dummy implementation is not meant to be instantiatedtls-api-security-framework
,true
only on macOS and iOS,false
elsewhere
const SUPPORTS_ALPN: bool
[src]
Whether this implementation supports ALPN negotiation.
const TYPE_DYN: &'static dyn TlsConnectorType
[src]
Dynamic (without type parameter) version of the connector.
This function returns a connector type, which can be used to constructor connectors.
Required methods
fn underlying_mut(&mut self) -> &mut Self::Underlying
[src]
Get the underlying builder.
API intentionally exposes the underlying acceptor builder to allow fine tuning not possible in common API.
fn info() -> ImplInfo
[src]
Implementation info.
fn builder() -> Result<Self::Builder>
[src]
New builder for the acceptor.
fn connect_with_socket<'a, S>(
&'a self,
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<TlsStreamWithSocket<S>>>ⓘ where
S: AsyncSocket,
[src]
&'a self,
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<TlsStreamWithSocket<S>>>ⓘ where
S: AsyncSocket,
Connect.
Returned future is resolved when the TLS-negotiation completes, and the stream is ready to send and receive.
This function returns a stream which provides access to the underlying socket.
Practically, connect
is usually needed.
fn connect_impl_tls_stream<'a, S>(
&'a self,
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<Self::TlsStream>>ⓘ where
S: AsyncSocket,
[src]
&'a self,
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<Self::TlsStream>>ⓘ where
S: AsyncSocket,
Connect.
Returned future is resolved when the TLS-negotiation completes, and the stream is ready to send and receive.
This version returns a stream of type of the underlying implementation, which may provide access to the implementation details.
Practically, connect
is usually needed.
Provided methods
fn into_dyn(self) -> TlsConnectorBox
[src]
Dynamic (without type parameter) version of the connector.
fn connect_default<'a, S>(
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<TlsStream>>ⓘ where
S: AsyncSocket,
[src]
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<TlsStream>>ⓘ where
S: AsyncSocket,
Connect using default settings.
Shortcut.
fn connect<'a, S>(
&'a self,
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<TlsStream>>ⓘ where
S: AsyncSocket,
[src]
&'a self,
domain: &'a str,
stream: S
) -> BoxFuture<'a, Result<TlsStream>>ⓘ where
S: AsyncSocket,
Connect.
Returned future is resolved when the TLS-negotiation completes, and the stream is ready to send and receive.
This is like the function you want to use.