settings
ModuleHow a client connects: encryption, certificate checks and deadlines.
Contents
use utopia_smtp::Timeouts;Rust
pub struct TimeoutsHow long each kind of wait may last. Reaching a server and hearing back from it deserve different patience; each bounds one operation, not a session.
Rust
use std::time::Duration;
use utopia_smtp::Timeouts;
let timeouts = Timeouts::new(1.5, 90.0, 45.0)?;
assert_eq!(timeouts.connect(), Duration::from_millis(1500));
assert!(Timeouts::new(0.0, 30.0, 30.0).is_err());
assert!(Timeouts::default().connect() < Timeouts::default().read());Also implements
Default.use utopia_smtp::Tls;Rust
pub struct TlsHow the TLS handshake is checked.
use utopia_smtp::Encryption;Rust
pub enum EncryptionWhether and how the session is encrypted.
use utopia_smtp::Verification;Rust
pub enum VerificationHow much of the certificate to believe.