Struct quinn::generic::ClientConfigBuilder[][src]

pub struct ClientConfigBuilder<S> where
    S: Session
{ /* fields omitted */ }

Helper for creating new outgoing connections.

If the native-certs and ct-logs features are enabled, ClientConfigBuilder::default() will construct a configuration that trusts the host OS certificate store and uses built-in certificate transparency logs respectively. These features are both enabled by default.

Implementations

impl<S> ClientConfigBuilder<S> where
    S: Session
[src]

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

Construct a builder using config as the initial state.

If you want to trust the usual certificate authorities trusted by the system, use ClientConfigBuilder::default() with the native-certs and ct-logs features enabled instead.

The ClientConfigBuilder provides a number of shortcuts to customize the TLS client behavior. However, if you want to take full control over the client’s behavior (such as setting up TLS mutual authentication), you can use the associated new() function to provide a ClientConfig with TLS configuration provided directly through its crypto field).

pub fn build(self) -> ClientConfig<S>[src]

Consume the builder and return the ClientConfig, which can then be used to configure outgoing connections from an Endpoint.

impl ClientConfigBuilder<TlsSession>[src]

pub fn add_certificate_authority(
    &mut self,
    cert: Certificate
) -> Result<&mut Self, Error>
[src]

Add a trusted certificate authority.

For more advanced/less secure certificate verification, construct a ClientConfig manually and use rustls’s dangerous_configuration feature to override the certificate verifier.

pub fn enable_keylog(&mut self) -> &mut Self[src]

Enable NSS-compatible cryptographic key logging to the SSLKEYLOGFILE environment variable.

Useful for debugging encrypted communications with protocol analyzers such as Wireshark.

pub fn protocols(&mut self, protocols: &[&[u8]]) -> &mut Self[src]

Set the application-layer protocols to accept, in order of descending preference.

When set, clients which don’t declare support for at least one of the supplied protocols will be rejected.

The IANA maintains a registry of standard protocol IDs, but custom IDs may be used as well.

pub fn enable_0rtt(&mut self) -> &mut Self[src]

Enable 0-RTT.

Trait Implementations

impl<S> Clone for ClientConfigBuilder<S> where
    S: Session
[src]

impl<S> Default for ClientConfigBuilder<S> where
    S: Session
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for ClientConfigBuilder<S>

impl<S> Send for ClientConfigBuilder<S> where
    <S as Session>::ClientConfig: Send

impl<S> Sync for ClientConfigBuilder<S> where
    <S as Session>::ClientConfig: Sync

impl<S> Unpin for ClientConfigBuilder<S> where
    <S as Session>::ClientConfig: Unpin

impl<S> !UnwindSafe for ClientConfigBuilder<S>

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> Instrument 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,