[][src]Struct rustls_connector::RustlsConnectorConfig

pub struct RustlsConnectorConfig(_);

Configuration helper for RustlsConnector

Implementations

impl RustlsConnectorConfig[src]

pub fn new(config: ClientConfig) -> Self[src]

Create a new RustlsConnector from the given ClientConfig

pub fn new_with_webpki_roots_certs() -> Self[src]

Create a new RustlsConnector using the webpki-roots certs (requires webpki-roots-certs feature enabled)

pub fn new_with_native_certs() -> Result<Self>[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>])[src]

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>
)
[src]

Sets persistence layer to persist.

pub fn set_mtu(&mut self, mtu: &Option<usize>)[src]

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>
[src]

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<'_>[src]

Access configuration options whose use is dangerous and requires extra care.

Trait Implementations

impl Clone for RustlsConnectorConfig[src]

impl Default for RustlsConnectorConfig[src]

impl Deref for RustlsConnectorConfig[src]

type Target = ClientConfig

The resulting type after dereferencing.

impl DerefMut for RustlsConnectorConfig[src]

impl From<ClientConfig> for RustlsConnectorConfig[src]

impl From<RustlsConnectorConfig> for RustlsConnector[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.