[][src]Struct conec::CoordConfig

pub struct CoordConfig { /* fields omitted */ }

Coordinator configuration struct

See library documentation for usage example.

Implementations

impl CoordConfig[src]

pub fn new_from_file(
    cert_path: &Path,
    key_path: &Path
) -> Result<Self, CertReadError>
[src]

Construct a new coordinator configuration from files.

This is a conveniece wrapper around CoordConfig::new. Both PEM and DER formats are supported.

pub fn new(cert: CertificateChain, key: PrivateKey) -> Self[src]

Construct a new coordinator configuration using the given CertificateChainand PrivateKey.

pub fn set_port(&mut self, port: u16) -> &mut Self[src]

Set listen port number to port

pub fn set_ip(&mut self, ip: IpAddr) -> &mut Self[src]

Set listen address to ip

By default, the listen address is set to 0.0.0.0:0. To bind to a host-assigned IPv6 port instead, one might call

This example is not tested
coord_cfg.set_ip(IpAddr::V6(Ipv6Addr::UNSPECIFIED));

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

Enable logging key material to the file specified by the environment variable SSLKEYLOGFILE.

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

Enable QUIC stateless retry.

Per QUIC spec, stateless retry defends against client address spoofing. The downside is that this adds another round-trip to new connections.

pub fn set_client_ca(&mut self, ca: Certificate) -> &mut Self[src]

Add a trusted certificate authority for checking Client certificates

If no trusted CA is provided, self-signed Client certificates are required.

pub fn set_client_ca_from_file(
    &mut self,
    cert_path: &Path
) -> Result<&mut Self, CertReadError>
[src]

Add a trusted certificate authority for checking Client certs from a file

This is a convenience wrapper around CoordConfig::set_client_ca. Both PEM and DER formats are supported.

Trait Implementations

impl Clone for CoordConfig[src]

impl Debug for CoordConfig[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.

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