[][src]Trait melib::backends::imap::cache::ImapCache

pub trait ImapCache: Send + Debug {
    fn reset(&mut self) -> Result<()>;
fn mailbox_state(&mut self, mailbox_hash: MailboxHash) -> Result<Option<()>>;
fn find_envelope(
        &mut self,
        identifier: Result<UID, EnvelopeHash>,
        mailbox_hash: MailboxHash
    ) -> Result<Option<CachedEnvelope>>;
fn update(
        &mut self,
        mailbox_hash: MailboxHash,
        refresh_events: &[(UID, RefreshEvent)]
    ) -> Result<()>;
fn update_mailbox(
        &mut self,
        mailbox_hash: MailboxHash,
        select_response: &SelectResponse
    ) -> Result<()>;
fn insert_envelopes(
        &mut self,
        mailbox_hash: MailboxHash,
        fetches: &[FetchResponse<'_>]
    ) -> Result<()>;
fn envelopes(
        &mut self,
        mailbox_hash: MailboxHash
    ) -> Result<Option<Vec<EnvelopeHash>>>;
fn clear(
        &mut self,
        mailbox_hash: MailboxHash,
        select_response: &SelectResponse
    ) -> Result<()>;
fn rfc822(
        &mut self,
        identifier: Result<UID, EnvelopeHash>,
        mailbox_hash: MailboxHash
    ) -> Result<Option<Vec<u8>>>; }

Required methods

fn reset(&mut self) -> Result<()>

fn mailbox_state(&mut self, mailbox_hash: MailboxHash) -> Result<Option<()>>

fn find_envelope(
    &mut self,
    identifier: Result<UID, EnvelopeHash>,
    mailbox_hash: MailboxHash
) -> Result<Option<CachedEnvelope>>

fn update(
    &mut self,
    mailbox_hash: MailboxHash,
    refresh_events: &[(UID, RefreshEvent)]
) -> Result<()>

fn update_mailbox(
    &mut self,
    mailbox_hash: MailboxHash,
    select_response: &SelectResponse
) -> Result<()>

fn insert_envelopes(
    &mut self,
    mailbox_hash: MailboxHash,
    fetches: &[FetchResponse<'_>]
) -> Result<()>

fn envelopes(
    &mut self,
    mailbox_hash: MailboxHash
) -> Result<Option<Vec<EnvelopeHash>>>

fn clear(
    &mut self,
    mailbox_hash: MailboxHash,
    select_response: &SelectResponse
) -> Result<()>

fn rfc822(
    &mut self,
    identifier: Result<UID, EnvelopeHash>,
    mailbox_hash: MailboxHash
) -> Result<Option<Vec<u8>>>

Loading content...

Implementors

impl ImapCache for Sqlite3Cache[src]

Loading content...