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 TlsAcceptor
s.
Required Associated Types§
Sourcetype Acceptor: TlsAcceptor
type Acceptor: TlsAcceptor
Type of acceptor produced by this builder.
Sourcetype Underlying
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§
Sourcefn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<()>
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
.
Sourcefn underlying_mut(&mut self) -> &mut Self::Underlying
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.
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.