#[non_exhaustive]pub enum TlsVersion {
Tlsv10,
Tlsv11,
Tlsv12,
Tlsv13,
}
Expand description
TLS protocol versions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tlsv10
TLS 1.0
Should only be used when trying to support legacy SMTP servers that haven’t updated to at least TLS 1.2 yet.
Supported by native-tls
and boring-tls
.
Tlsv11
TLS 1.1
Should only be used when trying to support legacy SMTP servers that haven’t updated to at least TLS 1.2 yet.
Supported by native-tls
and boring-tls
.
Tlsv12
TLS 1.2
A good option for most SMTP servers.
Supported by all TLS backends.
Tlsv13
TLS 1.3
The most secure option, altough not supported by all SMTP servers.
Altough it is technically supported by all TLS backends,
trying to set it for native-tls
will give a runtime error.
Trait Implementations§
Source§impl Clone for TlsVersion
impl Clone for TlsVersion
Source§fn clone(&self) -> TlsVersion
fn clone(&self) -> TlsVersion
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TlsVersion
impl Debug for TlsVersion
impl Copy for TlsVersion
Auto Trait Implementations§
impl Freeze for TlsVersion
impl RefUnwindSafe for TlsVersion
impl Send for TlsVersion
impl Sync for TlsVersion
impl Unpin for TlsVersion
impl UnwindSafe for TlsVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more