Struct tcp_stream::RustlsConnector
source · pub struct RustlsConnector(_);Expand description
Reexport rustls-connector’s TlsConnector
The connector
Implementations§
source§impl RustlsConnector
impl RustlsConnector
sourcepub fn new_with_webpki_roots_certs() -> RustlsConnector
pub fn new_with_webpki_roots_certs() -> RustlsConnector
Create a new RustlsConnector using the webpki-roots certs (requires webpki-roots-certs feature enabled)
sourcepub fn new_with_native_certs() -> Result<RustlsConnector, Error>
pub fn new_with_native_certs() -> Result<RustlsConnector, Error>
Create a new RustlsConnector using the system certs (requires native-certs feature enabled)
Errors
Returns an error if we fail to load the native certs.
sourcepub fn connect<S>(
&self,
domain: &str,
stream: S
) -> Result<StreamOwned<ClientConnection, S>, HandshakeError<S>>where
S: Debug + Read + Send + Sync + Write + 'static,
pub fn connect<S>( &self, domain: &str, stream: S ) -> Result<StreamOwned<ClientConnection, S>, HandshakeError<S>>where S: Debug + Read + Send + Sync + Write + 'static,
Connect to the given host
Errors
Returns a HandshakeError containing either the current state of the handshake or the
failure when we couldn’t complete the hanshake
Trait Implementations§
source§impl Clone for RustlsConnector
impl Clone for RustlsConnector
source§fn clone(&self) -> RustlsConnector
fn clone(&self) -> RustlsConnector
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Default for RustlsConnector
impl Default for RustlsConnector
source§fn default() -> RustlsConnector
fn default() -> RustlsConnector
Returns the “default value” for a type. Read more
source§impl From<Arc<ClientConfig>> for RustlsConnector
impl From<Arc<ClientConfig>> for RustlsConnector
source§fn from(config: Arc<ClientConfig>) -> RustlsConnector
fn from(config: Arc<ClientConfig>) -> RustlsConnector
Converts to this type from the input type.
source§impl From<ClientConfig> for RustlsConnector
impl From<ClientConfig> for RustlsConnector
source§fn from(config: ClientConfig) -> RustlsConnector
fn from(config: ClientConfig) -> RustlsConnector
Converts to this type from the input type.