pub trait MessageStore: Send + Sync {
// Required methods
fn append_message<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
message: Mail,
) -> Pin<Box<dyn Future<Output = Result<MessageMetadata>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 MessageId,
) -> Pin<Box<dyn Future<Output = Result<Option<Mail>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn set_flags<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
flags: MessageFlags,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
criteria: SearchCriteria,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn copy_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
dest_mailbox_id: &'life2 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_mailbox_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Message storage operations
Required Methods§
Sourcefn append_message<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
message: Mail,
) -> Pin<Box<dyn Future<Output = Result<MessageMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_message<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
message: Mail,
) -> Pin<Box<dyn Future<Output = Result<MessageMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append a message to a mailbox
Sourcefn get_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 MessageId,
) -> Pin<Box<dyn Future<Output = Result<Option<Mail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 MessageId,
) -> Pin<Box<dyn Future<Output = Result<Option<Mail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a message by ID
Sourcefn delete_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete messages
Sourcefn set_flags<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
flags: MessageFlags,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_flags<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
flags: MessageFlags,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set flags on messages
Sourcefn search<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
criteria: SearchCriteria,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
criteria: SearchCriteria,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search messages in a mailbox
Sourcefn copy_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
dest_mailbox_id: &'life2 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn copy_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
message_ids: &'life1 [MessageId],
dest_mailbox_id: &'life2 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Copy messages to another mailbox
Sourcefn get_mailbox_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mailbox_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all message metadata for a mailbox