Trait mailstrom::MailstromStorage [] [src]

pub trait MailstromStorage: Send + Sync {
    type Error: MailstromStorageError;
    fn store(
        &mut self,
        email: &Email,
        internal_status: &InternalStatus
    ) -> Result<(), Self::Error>; fn update_status(
        &mut self,
        internal_status: &InternalStatus
    ) -> Result<(), Self::Error>; fn retrieve(
        &self,
        message_id: &str
    ) -> Result<(Email, InternalStatus), Self::Error>; fn retrieve_status(
        &self,
        message_id: &str
    ) -> Result<InternalStatus, Self::Error>; fn retrieve_all_incomplete(
        &self
    ) -> Result<Vec<InternalStatus>, Self::Error>; }

A trait for implementing Mailstrom storage

Associated Types

Required Methods

Store an Email. This should overwrite if message-id matches an existing email.

Update the status of an email

Retrieve an Email and InternalStatus based on the message_id

Retrieve an InternalStatus based on the message_id

Retrieve all incomplete emails (status only). This is used to continue retrying after shutdown and later startup.

Implementors