[−][src]Struct tcp_stream::RustlsConnectorConfig
Reexport rustls-connector's TlsConnector Configuration helper for RustlsConnector
Implementations
impl RustlsConnectorConfig
[src]
Reexport rustls-connector's TlsConnector
pub fn new(config: ClientConfig) -> RustlsConnectorConfig
[src]
Create a new RustlsConnector from the given ClientConfig
pub fn new_with_webpki_roots_certs() -> RustlsConnectorConfig
[src]
Create a new RustlsConnector using the webpki-roots certs (requires webpki-roots-certs feature enabled)
pub fn new_with_native_certs() -> Result<RustlsConnectorConfig, Error>
[src]
Create a new RustlsConnector using the system certs (requires native-certs feature enabled)
Methods from Deref<Target = ClientConfig>
pub fn set_protocols(&mut self, protocols: &[Vec<u8>])
Set the ALPN protocol list to the given protocol names.
Overwrites any existing configured protocols.
The first element in the protocols
list is the most
preferred, the last is the least preferred.
pub fn set_persistence(
&mut self,
persist: Arc<dyn StoresClientSessions + 'static>
)
&mut self,
persist: Arc<dyn StoresClientSessions + 'static>
)
Sets persistence layer to persist
.
pub fn set_mtu(&mut self, mtu: &Option<usize>)
Sets MTU to mtu
. If None, the default is used.
If Some(x) then x must be greater than 5 bytes.
pub fn set_single_client_cert(
&mut self,
cert_chain: Vec<Certificate>,
key_der: PrivateKey
) -> Result<(), TLSError>
&mut self,
cert_chain: Vec<Certificate>,
key_der: PrivateKey
) -> Result<(), TLSError>
Sets a single client authentication certificate and private key. This is blindly used for all servers that ask for client auth.
cert_chain
is a vector of DER-encoded certificates,
key_der
is a DER-encoded RSA or ECDSA private key.
pub fn dangerous(&mut self) -> DangerousClientConfig
Access configuration options whose use is dangerous and requires extra care.
Trait Implementations
impl Clone for RustlsConnectorConfig
[src]
fn clone(&self) -> RustlsConnectorConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for RustlsConnectorConfig
[src]
fn default() -> RustlsConnectorConfig
[src]
impl Deref for RustlsConnectorConfig
[src]
type Target = ClientConfig
The resulting type after dereferencing.
fn deref(&self) -> &<RustlsConnectorConfig as Deref>::Target
[src]
impl DerefMut for RustlsConnectorConfig
[src]
fn deref_mut(&mut self) -> &mut <RustlsConnectorConfig as Deref>::Target
[src]
impl From<ClientConfig> for RustlsConnectorConfig
[src]
fn from(config: ClientConfig) -> RustlsConnectorConfig
[src]
impl From<RustlsConnectorConfig> for RustlsConnector
[src]
fn from(config: RustlsConnectorConfig) -> RustlsConnector
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RustlsConnectorConfig
impl Send for RustlsConnectorConfig
impl Sync for RustlsConnectorConfig
impl Unpin for RustlsConnectorConfig
impl !UnwindSafe for RustlsConnectorConfig
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,