#[non_exhaustive]pub enum Tls {
Disable,
Verify(TlsConnector),
}Expand description
How the connection is encrypted.
Non-exhaustive, so that other ways to check a server (pinning a
certificate, say) can be added without breaking a match.
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.
Disable
No TLS. Use it only on a network you trust: anyone on the path can read and change what is sent, though not a SCRAM password.
Verify(TlsConnector)
TLS, checking the server’s certificate with this connector: against its trusted authorities, and against the host name the client connects to. The connection fails if the server does not support TLS.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tls
impl !UnwindSafe for Tls
impl Forget for Tls
impl Freeze for Tls
impl Move for Tls
impl Send for Tls
impl Sync for Tls
impl Unpin for Tls
impl UnsafeUnpin for Tls
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