Struct tcp_stream::RustlsConnector
source · [−]pub struct RustlsConnector(_);
Expand description
Reexport rustls-connector’s TlsConnector
The connector
Implementations
sourceimpl RustlsConnector
impl RustlsConnector
Reexport rustls-connector’s TlsConnector
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: 'static + Debug + Read + Send + Sync + Write,
pub fn connect<S>(
&self,
domain: &str,
stream: S
) -> Result<StreamOwned<ClientConnection, S>, HandshakeError<S>> where
S: 'static + Debug + Read + Send + Sync + Write,
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
sourceimpl Clone for RustlsConnector
impl Clone for RustlsConnector
sourcefn clone(&self) -> RustlsConnector
fn clone(&self) -> RustlsConnector
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for RustlsConnector
impl Default for RustlsConnector
sourcefn default() -> RustlsConnector
fn default() -> RustlsConnector
Returns the “default value” for a type. Read more
sourceimpl From<Arc<ClientConfig>> for RustlsConnector
impl From<Arc<ClientConfig>> for RustlsConnector
sourcefn from(config: Arc<ClientConfig>) -> RustlsConnector
fn from(config: Arc<ClientConfig>) -> RustlsConnector
Converts to this type from the input type.
sourceimpl From<ClientConfig> for RustlsConnector
impl From<ClientConfig> for RustlsConnector
sourcefn from(config: ClientConfig) -> RustlsConnector
fn from(config: ClientConfig) -> RustlsConnector
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for RustlsConnector
impl Send for RustlsConnector
impl Sync for RustlsConnector
impl Unpin for RustlsConnector
impl !UnwindSafe for RustlsConnector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more