Struct native_tls::TlsAcceptorBuilder
source · pub struct TlsAcceptorBuilder { /* private fields */ }
Expand description
A builder for TlsAcceptor
s.
Implementations§
source§impl TlsAcceptorBuilder
impl TlsAcceptorBuilder
sourcepub fn min_protocol_version(
&mut self,
protocol: Option<Protocol>
) -> &mut TlsAcceptorBuilder
pub fn min_protocol_version( &mut self, protocol: Option<Protocol> ) -> &mut TlsAcceptorBuilder
Sets the minimum supported protocol version.
A value of None
enables support for the oldest protocols supported by the implementation.
Defaults to Some(Protocol::Tlsv10)
.
sourcepub fn max_protocol_version(
&mut self,
protocol: Option<Protocol>
) -> &mut TlsAcceptorBuilder
pub fn max_protocol_version( &mut self, protocol: Option<Protocol> ) -> &mut TlsAcceptorBuilder
Sets the maximum supported protocol version.
A value of None
enables support for the newest protocols supported by the implementation.
Defaults to None
.
sourcepub fn build(&self) -> Result<TlsAcceptor>
pub fn build(&self) -> Result<TlsAcceptor>
Creates a new TlsAcceptor
.