Trait melib::backends::MailBackend[][src]

pub trait MailBackend: Debug + Send + Sync {
Show 21 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 is_online(&self) -> ResultFuture<()> { ... }
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]>> { ... }
fn submit(
        &self,
        _bytes: Vec<u8>,
        _mailbox_hash: Option<MailboxHash>,
        _flags: Option<Flag>
    ) -> ResultFuture<()> { ... }
}

Required methods

Provided methods

Implementors