Trait samotop_delivery::smtp::net::tls::MayBeTls [−][src]
A stream implementing this trait may be able to upgrade to TLS But maybe not...
Required methods
pub fn encrypt(self: Pin<&mut Self>)
[src]
Initiates the TLS negotiations. The stream must then block all reads/writes until the underlying TLS handshake is done. If it is not possible to encrypt and subsequent reads/writes must fail.
pub fn can_encrypt(&self) -> bool
[src]
Returns true only if calling encrypt would make sense:
- required encryption setup information is available.
- the stream is not encrypted yet.
pub fn is_encrypted(&self) -> bool
[src]
Returns true if the stream is already encrypted.
Implementors
impl MayBeTls for TlsCapable
[src]
pub fn encrypt(self: Pin<&mut TlsCapable>)
[src]
pub fn can_encrypt(&self) -> bool
[src]
pub fn is_encrypted(&self) -> bool
[src]
impl<TLSIO, T> MayBeTls for T where
T: DerefMut<Target = TLSIO> + Unpin + AsyncRead + AsyncWrite + Sync + Send,
TLSIO: MayBeTls + Unpin + ?Sized,
[src]
T: DerefMut<Target = TLSIO> + Unpin + AsyncRead + AsyncWrite + Sync + Send,
TLSIO: MayBeTls + Unpin + ?Sized,