[−][src]Struct rustls_connector::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]
&mut self,
persist: Arc<dyn StoresClientSessions + 'static>
)
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]
&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<'_>
[src]
Access configuration options whose use is dangerous and requires extra care.
Trait Implementations
impl Clone for RustlsConnectorConfig
[src]
pub fn clone(&self) -> RustlsConnectorConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for RustlsConnectorConfig
[src]
impl Deref for RustlsConnectorConfig
[src]
type Target = ClientConfig
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target
[src]
impl DerefMut for RustlsConnectorConfig
[src]
impl From<ClientConfig> for RustlsConnectorConfig
[src]
pub fn from(config: ClientConfig) -> Self
[src]
impl From<RustlsConnectorConfig> for RustlsConnector
[src]
pub fn from(config: RustlsConnectorConfig) -> Self
[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,
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> 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>,