pub trait MailBackend: Debug + Send + Sync {
Show 21 methods // Required methods fn capabilities(&self) -> MailBackendCapabilities; fn fetch( &mut self, mailbox_hash: MailboxHash ) -> Result<Pin<Box<dyn Stream<Item = Result<Vec<Envelope>>> + Send + 'static>>>; fn refresh(&mut self, mailbox_hash: MailboxHash) -> ResultFuture<()>; fn watch(&self) -> ResultFuture<()>; fn mailboxes(&self) -> ResultFuture<HashMap<MailboxHash, Mailbox>>; fn operation(&self, hash: EnvelopeHash) -> Result<Box<dyn BackendOp>>; fn save( &self, bytes: Vec<u8>, mailbox_hash: MailboxHash, flags: Option<Flag> ) -> ResultFuture<()>; fn copy_messages( &mut self, env_hashes: EnvelopeHashBatch, source_mailbox_hash: MailboxHash, destination_mailbox_hash: MailboxHash, move_: bool ) -> ResultFuture<()>; fn set_flags( &mut self, env_hashes: EnvelopeHashBatch, mailbox_hash: MailboxHash, flags: SmallVec<[(Result<Flag, String>, bool); 8]> ) -> ResultFuture<()>; fn delete_messages( &mut self, env_hashes: EnvelopeHashBatch, mailbox_hash: MailboxHash ) -> ResultFuture<()>; fn collection(&self) -> Collection; fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; fn create_mailbox( &mut self, path: String ) -> ResultFuture<(MailboxHash, HashMap<MailboxHash, Mailbox>)>; fn delete_mailbox( &mut self, mailbox_hash: MailboxHash ) -> ResultFuture<HashMap<MailboxHash, Mailbox>>; fn set_mailbox_subscription( &mut self, mailbox_hash: MailboxHash, val: bool ) -> ResultFuture<()>; fn rename_mailbox( &mut self, mailbox_hash: MailboxHash, new_path: String ) -> ResultFuture<Mailbox>; fn set_mailbox_permissions( &mut self, mailbox_hash: MailboxHash, val: MailboxPermissions ) -> ResultFuture<()>; fn search( &self, query: Query, mailbox_hash: Option<MailboxHash> ) -> ResultFuture<SmallVec<[EnvelopeHash; 512]>>; // Provided methods fn is_online(&self) -> ResultFuture<()> { ... } fn submit( &self, _bytes: Vec<u8>, _mailbox_hash: Option<MailboxHash>, _flags: Option<Flag> ) -> ResultFuture<()> { ... }
}

Required Methods§

source

fn capabilities(&self) -> MailBackendCapabilities

source

fn fetch( &mut self, mailbox_hash: MailboxHash ) -> Result<Pin<Box<dyn Stream<Item = Result<Vec<Envelope>>> + Send + 'static>>>

source

fn refresh(&mut self, mailbox_hash: MailboxHash) -> ResultFuture<()>

source

fn watch(&self) -> ResultFuture<()>

source

fn mailboxes(&self) -> ResultFuture<HashMap<MailboxHash, Mailbox>>

source

fn operation(&self, hash: EnvelopeHash) -> Result<Box<dyn BackendOp>>

source

fn save( &self, bytes: Vec<u8>, mailbox_hash: MailboxHash, flags: Option<Flag> ) -> ResultFuture<()>

source

fn copy_messages( &mut self, env_hashes: EnvelopeHashBatch, source_mailbox_hash: MailboxHash, destination_mailbox_hash: MailboxHash, move_: bool ) -> ResultFuture<()>

source

fn set_flags( &mut self, env_hashes: EnvelopeHashBatch, mailbox_hash: MailboxHash, flags: SmallVec<[(Result<Flag, String>, bool); 8]> ) -> ResultFuture<()>

source

fn delete_messages( &mut self, env_hashes: EnvelopeHashBatch, mailbox_hash: MailboxHash ) -> ResultFuture<()>

source

fn collection(&self) -> Collection

source

fn as_any(&self) -> &dyn Any

source

fn as_any_mut(&mut self) -> &mut dyn Any

source

fn create_mailbox( &mut self, path: String ) -> ResultFuture<(MailboxHash, HashMap<MailboxHash, Mailbox>)>

source

fn delete_mailbox( &mut self, mailbox_hash: MailboxHash ) -> ResultFuture<HashMap<MailboxHash, Mailbox>>

source

fn set_mailbox_subscription( &mut self, mailbox_hash: MailboxHash, val: bool ) -> ResultFuture<()>

source

fn rename_mailbox( &mut self, mailbox_hash: MailboxHash, new_path: String ) -> ResultFuture<Mailbox>

source

fn set_mailbox_permissions( &mut self, mailbox_hash: MailboxHash, val: MailboxPermissions ) -> ResultFuture<()>

source

fn search( &self, query: Query, mailbox_hash: Option<MailboxHash> ) -> ResultFuture<SmallVec<[EnvelopeHash; 512]>>

Provided Methods§

source

fn is_online(&self) -> ResultFuture<()>

source

fn submit( &self, _bytes: Vec<u8>, _mailbox_hash: Option<MailboxHash>, _flags: Option<Flag> ) -> ResultFuture<()>

Implementors§