Trait MailStore

Source
pub trait MailStore<'a> {
    // Required methods
    fn create_mail_from_path<P, CollName>(
        &'a self,
        p: P,
        collection_name: CollName,
        config: &Config,
    ) -> Result<FileLockEntry<'a>>
       where P: AsRef<Path> + Debug,
             CollName: AsRef<str> + Debug;
    fn get_mail_from_path<P>(
        &'a self,
        p: P,
    ) -> Result<Option<FileLockEntry<'a>>>
       where P: AsRef<Path> + Debug;
    fn retrieve_mail_from_path<P, CollName>(
        &'a self,
        p: P,
        collection_name: CollName,
        config: &Config,
    ) -> Result<FileLockEntry<'a>>
       where P: AsRef<Path> + Debug,
             CollName: AsRef<str> + Debug;
    fn get_mail(&'a self, mid: MessageId) -> Result<Option<FileLockEntry<'a>>>;
    fn all_mails(&'a self) -> Result<Entries<'a>>;
}

Required Methods§

Source

fn create_mail_from_path<P, CollName>( &'a self, p: P, collection_name: CollName, config: &Config, ) -> Result<FileLockEntry<'a>>
where P: AsRef<Path> + Debug, CollName: AsRef<str> + Debug,

Source

fn get_mail_from_path<P>(&'a self, p: P) -> Result<Option<FileLockEntry<'a>>>
where P: AsRef<Path> + Debug,

Source

fn retrieve_mail_from_path<P, CollName>( &'a self, p: P, collection_name: CollName, config: &Config, ) -> Result<FileLockEntry<'a>>
where P: AsRef<Path> + Debug, CollName: AsRef<str> + Debug,

Source

fn get_mail(&'a self, mid: MessageId) -> Result<Option<FileLockEntry<'a>>>

Source

fn all_mails(&'a self) -> Result<Entries<'a>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> MailStore<'a> for Store

Source§

fn get_mail_from_path<P>(&'a self, p: P) -> Result<Option<FileLockEntry<'a>>>
where P: AsRef<Path> + Debug,

Same as MailStore::retrieve_mail_from_path() but uses Store::get() instead of Store::retrieve()

Source§

fn create_mail_from_path<P, CollName>( &'a self, p: P, collection_name: CollName, config: &Config, ) -> Result<FileLockEntry<'a>>
where P: AsRef<Path> + Debug, CollName: AsRef<str> + Debug,

Source§

fn retrieve_mail_from_path<P, CollName>( &'a self, p: P, collection_name: CollName, config: &Config, ) -> Result<FileLockEntry<'a>>
where P: AsRef<Path> + Debug, CollName: AsRef<str> + Debug,

Source§

fn get_mail(&'a self, mid: MessageId) -> Result<Option<FileLockEntry<'a>>>

Source§

fn all_mails(&'a self) -> Result<Entries<'a>>

Implementors§