[][src]Struct mailstrom::Mailstrom

pub struct Mailstrom<S: MailstromStorage + 'static> { /* fields omitted */ }


impl<S: MailstromStorage + 'static> Mailstrom<S>[src]

pub fn new(config: Config, storage: S) -> Mailstrom<S>[src]

Create a new Mailstrom instance for sending emails.

pub fn start(&mut self) -> Result<(), Error>[src]

Mailstrom requires an explicit start command to start sending emails. This is because some clients are only interested in reading the status of sent emails, and will terminate before any real sending can be accomplished.

pub fn die(&mut self) -> Result<(), Error>[src]

Ask Mailstrom to die. This is not required, you can simply let it fall out of scope and it will clean itself up.

pub fn worker_status(&self) -> WorkerStatus[src]

Determine the status of the worker

pub fn send_email(&mut self, email: Email) -> Result<String, Error>[src]

Send an email, getting back its message-id

pub fn query_status(&mut self, message_id: &str) -> Result<MessageStatus, Error>[src]

pub fn query_recent(&mut self) -> Result<Vec<MessageStatus>, Error>[src]

Trait Implementations

impl<S: MailstromStorage + 'static> Drop for Mailstrom<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for Mailstrom<S>

impl<S> Send for Mailstrom<S>

impl<S> !Sync for Mailstrom<S>

impl<S> Unpin for Mailstrom<S>

impl<S> !UnwindSafe for Mailstrom<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> TryFrom<T> for T[src]

type Error = ParseError

The type returned in the event of a conversion error.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.