Skip to main content

Mailable

Trait Mailable 

Source
pub trait Mailable: Send + Sync {
    // Required methods
    fn envelope(&self) -> Envelope;
    fn content(&self) -> Content;

    // Provided method
    fn build(&self, email: Email) -> Email { ... }
}
Expand description

Laravel-style mailable: describe envelope + content, send via Email::send_mail.

Required Methods§

Source

fn envelope(&self) -> Envelope

Source

fn content(&self) -> Content

Provided Methods§

Source

fn build(&self, email: Email) -> Email

Apply this mailable onto a started Email (already has to / client).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§