pub enum SmtpSecurity {
None,
Opportunistic,
Required,
Wrapper,
}
Expand description
Define how to apply TLS to a SMTP client connection. Will be converted into async_smtp::ClientSecurity.
Variants§
None
Insecure connection only (for testing purposes).
Opportunistic
Start with insecure connection and use STARTTLS
when available.
Required
Start with insecure connection and require STARTTLS
.
Wrapper
Use TLS wrapped connection.
Implementations§
source§impl SmtpSecurity
impl SmtpSecurity
pub fn to_client_security( self, tls_params: ClientTlsParameters ) -> ClientSecurity
Trait Implementations§
source§impl Clone for SmtpSecurity
impl Clone for SmtpSecurity
source§fn clone(&self) -> SmtpSecurity
fn clone(&self) -> SmtpSecurity
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 SmtpSecurity
impl Debug for SmtpSecurity
source§impl Default for SmtpSecurity
impl Default for SmtpSecurity
source§impl<'de> Deserialize<'de> for SmtpSecurity
impl<'de> Deserialize<'de> for SmtpSecurity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for SmtpSecurity
impl Serialize for SmtpSecurity
impl Copy for SmtpSecurity
Auto Trait Implementations§
impl RefUnwindSafe for SmtpSecurity
impl Send for SmtpSecurity
impl Sync for SmtpSecurity
impl Unpin for SmtpSecurity
impl UnwindSafe for SmtpSecurity
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