pub trait Transport {
type Ok;
type Error;
// Required method
fn send_raw(
&self,
envelope: &Envelope,
email: &[u8],
) -> Result<Self::Ok, Self::Error>;
// Provided methods
fn send(&self, message: &Message) -> Result<Self::Ok, Self::Error> { ... }
fn shutdown(&self) { ... }
}Expand description
Blocking Transport method for emails
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn send(&self, message: &Message) -> Result<Self::Ok, Self::Error>
Available on crate feature builder only.
fn send(&self, message: &Message) -> Result<Self::Ok, Self::Error>
builder only.Sends the email
Sourcefn shutdown(&self)
fn shutdown(&self)
Shuts down the transport. Future calls to Self::send and
Self::send_raw might fail.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl Transport for FileTransport
Available on crate feature file-transport only.
impl Transport for FileTransport
Available on crate feature
file-transport only.Source§impl Transport for SendmailTransport
Available on crate feature sendmail-transport only.
impl Transport for SendmailTransport
Available on crate feature
sendmail-transport only.Source§impl Transport for SmtpTransport
Available on crate feature smtp-transport only.
impl Transport for SmtpTransport
Available on crate feature
smtp-transport only.