Trait TlsAcceptorBuilder

Source
pub trait TlsAcceptorBuilder:
    Sized
    + Sync
    + Send
    + 'static {
    type Acceptor: TlsAcceptor;
    type Underlying;

    // Required methods
    fn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<()>;
    fn underlying_mut(&mut self) -> &mut Self::Underlying;
    fn build(self) -> Result<Self::Acceptor>;
}
Expand description

A builder for TlsAcceptors.

Required Associated Types§

Source

type Acceptor: TlsAcceptor

Type of acceptor produced by this builder.

Source

type Underlying

Type of the underlying builder.

Underlying builder might be needed to perform custom setup when it is not supported by common API.

Required Methods§

Source

fn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<()>

Specify ALPN protocols for negotiation.

This operation returns an error if the implemenation does not support ALPN.

Whether ALPN is supported, can be queried using TlsAcceptor::SUPPORTS_ALPN.

Source

fn underlying_mut(&mut self) -> &mut Self::Underlying

Get the underlying builder.

API intentionally exposes the underlying acceptor builder to allow fine tuning not possible in common API.

Source

fn build(self) -> Result<Self::Acceptor>

Finish the acceptor construction.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§