Struct amq_protocol_tcp::RustlsConnectorConfig[][src]

pub struct RustlsConnectorConfig(_);

Configuration helper for RustlsConnector

Implementations

impl RustlsConnectorConfig[src]

#[must_use]pub fn new(config: ClientConfig) -> RustlsConnectorConfig[src]

Create a new RustlsConnector from the given [ClientConfig]

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>
)

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>

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.

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

impl<T> Instrument for T[src]

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.