[−][src]Struct tcp_stream::RustlsConnector
Reexport rustls-connector's TlsConnector
The connector
Implementations
impl RustlsConnector
[src]
Reexport rustls-connector's TlsConnector
pub fn new_with_webpki_roots_certs() -> RustlsConnector
[src]
Create a new RustlsConnector using the webpki-roots certs (requires webpki-roots-certs feature enabled)
pub fn new_with_native_certs() -> Result<RustlsConnector, Error>
[src]
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.
pub fn connect<S>(
&self,
domain: &str,
stream: S
) -> Result<StreamOwned<ClientSession, S>, HandshakeError<S>> where
S: 'static + Read + Write + Send + Sync + Debug,
[src]
&self,
domain: &str,
stream: S
) -> Result<StreamOwned<ClientSession, S>, HandshakeError<S>> where
S: 'static + Read + Write + Send + Sync + Debug,
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
impl Clone for RustlsConnector
[src]
pub fn clone(&self) -> RustlsConnector
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for RustlsConnector
[src]
pub fn default() -> RustlsConnector
[src]
impl From<Arc<ClientConfig>> for RustlsConnector
[src]
pub fn from(config: Arc<ClientConfig>) -> RustlsConnector
[src]
impl From<ClientConfig> for RustlsConnector
[src]
pub fn from(config: ClientConfig) -> RustlsConnector
[src]
impl From<RustlsConnectorConfig> for RustlsConnector
[src]
pub fn from(config: RustlsConnectorConfig) -> RustlsConnector
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RustlsConnector
[src]
impl Send for RustlsConnector
[src]
impl Sync for RustlsConnector
[src]
impl Unpin for RustlsConnector
[src]
impl !UnwindSafe for RustlsConnector
[src]
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,