Skip to main content

MailboxStore

Trait MailboxStore 

Source
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§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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)

Source

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

Source

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

Source

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,

List subscribed mailboxes

Provided Methods§

Source

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

Source

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

Source

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

Source

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

Implementors§