pub struct Mailstrom<S: MailstromStorage + 'static> { /* private fields */ }
Implementations
sourceimpl<S: MailstromStorage + 'static> Mailstrom<S>
impl<S: MailstromStorage + 'static> Mailstrom<S>
sourcepub fn new(config: Config, storage: S) -> Mailstrom<S>
pub fn new(config: Config, storage: S) -> Mailstrom<S>
Create a new Mailstrom instance for sending emails.
sourcepub fn start(&mut self) -> Result<(), Error>
pub fn start(&mut self) -> Result<(), Error>
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.
sourcepub fn die(&mut self) -> Result<(), Error>
pub fn die(&mut self) -> Result<(), Error>
Ask Mailstrom to die. This is not required, you can simply let it fall out of scope and it will clean itself up.
sourcepub fn worker_status(&self) -> WorkerStatus
pub fn worker_status(&self) -> WorkerStatus
Determine the status of the worker
sourcepub fn send_email(&mut self, email: Email) -> Result<String, Error>
pub fn send_email(&mut self, email: Email) -> Result<String, Error>
Send an email, getting back its message-id
pub fn query_status(&mut self, message_id: &str) -> Result<MessageStatus, Error>
pub fn query_recent(&mut self) -> Result<Vec<MessageStatus>, Error>
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more