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§
fn create_mail_from_path<P, CollName>( &'a self, p: P, collection_name: CollName, config: &Config, ) -> Result<FileLockEntry<'a>>
fn get_mail_from_path<P>(&'a self, p: P) -> Result<Option<FileLockEntry<'a>>>
fn retrieve_mail_from_path<P, CollName>( &'a self, p: P, collection_name: CollName, config: &Config, ) -> Result<FileLockEntry<'a>>
fn get_mail(&'a self, mid: MessageId) -> Result<Option<FileLockEntry<'a>>>
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
impl<'a> MailStore<'a> for Store
Source§fn get_mail_from_path<P>(&'a self, p: P) -> Result<Option<FileLockEntry<'a>>>
fn get_mail_from_path<P>(&'a self, p: P) -> Result<Option<FileLockEntry<'a>>>
Same as MailStore::retrieve_mail_from_path() but uses Store::get() instead of Store::retrieve()