pub trait MailboxStore: Send + Sync {
Show 13 methods
// Required methods
fn create_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 MailboxPath,
) -> Pin<Box<dyn Future<Output = Result<MailboxId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn rename_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
new_path: &'life2 MailboxPath,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Option<Mailbox>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_mailboxes<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mailbox>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_user_inbox<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn subscribe_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
mailbox_name: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn unsubscribe_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 Username,
mailbox_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_subscriptions<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn create_mailbox_with_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 MailboxPath,
special_use: SpecialUseAttributes,
) -> Pin<Box<dyn Future<Output = Result<MailboxId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_mailbox_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<SpecialUseAttributes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn set_mailbox_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
special_use: SpecialUseAttributes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn list_mailboxes_by_special_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 Username,
special_use: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mailbox>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Mailbox storage operations
Required Methods§
Sourcefn create_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 MailboxPath,
) -> Pin<Box<dyn Future<Output = Result<MailboxId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 MailboxPath,
) -> Pin<Box<dyn Future<Output = Result<MailboxId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new mailbox
Sourcefn delete_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a mailbox
Sourcefn rename_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
new_path: &'life2 MailboxPath,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
new_path: &'life2 MailboxPath,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Rename a mailbox
Sourcefn get_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Option<Mailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Option<Mailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get mailbox by ID
Sourcefn list_mailboxes<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_mailboxes<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all mailboxes for a user
Sourcefn get_user_inbox<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_inbox<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a user’s INBOX mailbox ID (primary mailbox)
Sourcefn subscribe_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
mailbox_name: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 Username,
mailbox_name: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe to a mailbox
Sourcefn unsubscribe_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 Username,
mailbox_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unsubscribe_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 Username,
mailbox_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Unsubscribe from a mailbox
Provided Methods§
Sourcefn create_mailbox_with_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 MailboxPath,
special_use: SpecialUseAttributes,
) -> Pin<Box<dyn Future<Output = Result<MailboxId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_mailbox_with_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 MailboxPath,
special_use: SpecialUseAttributes,
) -> Pin<Box<dyn Future<Output = Result<MailboxId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new mailbox with special-use attributes
Sourcefn get_mailbox_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<SpecialUseAttributes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mailbox_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 MailboxId,
) -> Pin<Box<dyn Future<Output = Result<SpecialUseAttributes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get mailbox special-use attributes
Sourcefn set_mailbox_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
special_use: SpecialUseAttributes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_mailbox_special_use<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MailboxId,
special_use: SpecialUseAttributes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set mailbox special-use attributes
Sourcefn list_mailboxes_by_special_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 Username,
special_use: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_mailboxes_by_special_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 Username,
special_use: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List mailboxes with a specific special-use attribute