pub struct TlsConfig {
pub default: TlsEndpointConfig,
pub smtp: Option<TlsEndpointConfig>,
pub imap: Option<TlsEndpointConfig>,
pub pop3: Option<TlsEndpointConfig>,
pub jmap: Option<TlsEndpointConfig>,
}Expand description
Top-level TLS configuration block ([tls] in TOML).
default is the fallback used by any protocol that does not have a
dedicated override. Per-protocol overrides take precedence when present.
Fields§
§default: TlsEndpointConfigDefault certificate/key pair used as a fallback for all protocols.
smtp: Option<TlsEndpointConfig>Default: None. SMTP-specific TLS certificate override.
imap: Option<TlsEndpointConfig>Default: None. IMAP-specific TLS certificate override.
pop3: Option<TlsEndpointConfig>Default: None. POP3-specific TLS certificate override.
jmap: Option<TlsEndpointConfig>Default: None. JMAP-specific TLS certificate override.
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn tls_for_protocol(&self, proto: ProtocolKind) -> &TlsEndpointConfig
pub fn tls_for_protocol(&self, proto: ProtocolKind) -> &TlsEndpointConfig
Return the TlsEndpointConfig that should be used for proto.
Returns the per-protocol override when present, otherwise the
default endpoint.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsConfig
impl<'de> Deserialize<'de> for TlsConfig
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
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl UnwindSafe for TlsConfig
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