[−][src]Struct tcp_stream::RustlsConnectorConfig
Reexport rustls-connector's TlsConnector
Configuration helper for RustlsConnector
Implementations
impl RustlsConnectorConfig
[src]
Reexport rustls-connector's TlsConnector
#[must_use]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)
Errors
Returns an error if we fail to load the native certs.
Methods from Deref<Target = ClientConfig>
pub fn set_protocols(&mut self, protocols: &[Vec<u8, Global>])
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, Global>,
key_der: PrivateKey
) -> Result<(), TLSError>
&mut self,
cert_chain: Vec<Certificate, Global>,
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]
pub fn clone(&self) -> RustlsConnectorConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for RustlsConnectorConfig
[src]
pub fn default() -> RustlsConnectorConfig
[src]
impl Deref for RustlsConnectorConfig
[src]
type Target = ClientConfig
The resulting type after dereferencing.
pub fn deref(&self) -> &<RustlsConnectorConfig as Deref>::Target
[src]
impl DerefMut for RustlsConnectorConfig
[src]
pub fn deref_mut(&mut self) -> &mut <RustlsConnectorConfig as Deref>::Target
[src]
impl From<ClientConfig> for RustlsConnectorConfig
[src]
pub fn from(config: ClientConfig) -> RustlsConnectorConfig
[src]
impl From<RustlsConnectorConfig> for RustlsConnector
[src]
pub fn from(config: RustlsConnectorConfig) -> RustlsConnector
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RustlsConnectorConfig
[src]
impl Send for RustlsConnectorConfig
[src]
impl Sync for RustlsConnectorConfig
[src]
impl Unpin for RustlsConnectorConfig
[src]
impl !UnwindSafe for RustlsConnectorConfig
[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>,