Struct email::backend::NotmuchBackend
source · pub struct NotmuchBackend { /* private fields */ }
Expand description
The Notmuch backend.
Implementations§
source§impl NotmuchBackend
impl NotmuchBackend
sourcepub fn new(
account_config: AccountConfig,
notmuch_config: NotmuchConfig
) -> Result<Self>
pub fn new( account_config: AccountConfig, notmuch_config: NotmuchConfig ) -> Result<Self>
Creates a new Notmuch backend from configurations.
sourcepub fn get_default_db_path() -> Result<PathBuf>
pub fn get_default_db_path() -> Result<PathBuf>
Returns the default Notmuch database path from the notmuch lib.
The default path comes from the Notmuch user configuration
file ~/.notmuchrc
.
Trait Implementations§
source§impl Backend for NotmuchBackend
impl Backend for NotmuchBackend
source§fn add_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, _folder: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Creates the given folder.
source§fn list_folders<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Folders>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_folders<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Folders>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Lists all available folders.
source§fn expunge_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn expunge_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, _folder: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Expunges the given folder. Read more
source§fn purge_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn purge_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, _folder: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Purges the given folder. Read more
source§fn delete_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, _folder: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Definitely deletes the given folder. Read more
source§fn get_envelope<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str,
internal_id: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Envelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_envelope<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _folder: &'life1 str, internal_id: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<Envelope>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Gets the envelope from the given folder matching the given id.
source§fn list_envelopes<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder: &'life1 str,
page_size: usize,
page: usize
) -> Pin<Box<dyn Future<Output = Result<Envelopes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_envelopes<'life0, 'life1, 'async_trait>( &'life0 mut self, folder: &'life1 str, page_size: usize, page: usize ) -> Pin<Box<dyn Future<Output = Result<Envelopes>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Lists all available envelopes from the given folder matching
the given pagination.
source§fn search_envelopes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
folder: &'life1 str,
query: &'life2 str,
_sort: &'life3 str,
page_size: usize,
page: usize
) -> Pin<Box<dyn Future<Output = Result<Envelopes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn search_envelopes<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, folder: &'life1 str, query: &'life2 str, _sort: &'life3 str, page_size: usize, page: usize ) -> Pin<Box<dyn Future<Output = Result<Envelopes>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Sorts and filters envelopes from the given folder matching the
given query, sort and pagination.
source§fn add_email<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
folder: &'life1 str,
email: &'life2 [u8],
flags: &'life3 Flags
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_email<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, folder: &'life1 str, email: &'life2 [u8], flags: &'life3 Flags ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Adds the given raw email with the given flags to the given
folder.
source§fn preview_emails<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str,
internal_ids: Vec<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<Messages>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn preview_emails<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _folder: &'life1 str, internal_ids: Vec<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<Messages>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Previews emails from the given folder matching the given ids. Read more
source§fn get_emails<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder: &'life1 str,
internal_ids: Vec<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<Messages>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_emails<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, folder: &'life1 str, internal_ids: Vec<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<Messages>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Gets emails from the given folder matching the given ids.
source§fn copy_emails<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_from_dir: &'life1 str,
_to_dir: &'life2 str,
_internal_ids: Vec<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn copy_emails<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _from_dir: &'life1 str, _to_dir: &'life2 str, _internal_ids: Vec<&'life3 str> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Copies emails from the given folder to the given folder
matching the given ids.
source§fn move_emails<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_from_dir: &'life1 str,
_to_dir: &'life2 str,
_internal_ids: Vec<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn move_emails<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _from_dir: &'life1 str, _to_dir: &'life2 str, _internal_ids: Vec<&'life3 str> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Moves emails from the given folder to the given folder
matching the given ids.
source§fn delete_emails<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str,
internal_ids: Vec<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_emails<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _folder: &'life1 str, internal_ids: Vec<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Deletes emails from the given folder matching the given ids. Read more
source§fn add_flags<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str,
internal_ids: Vec<&'life2 str>,
flags: &'life3 Flags
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_flags<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _folder: &'life1 str, internal_ids: Vec<&'life2 str>, flags: &'life3 Flags ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Adds the given flags to envelopes matching the given ids from
the given folder.
source§fn set_flags<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str,
internal_ids: Vec<&'life2 str>,
flags: &'life3 Flags
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_flags<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _folder: &'life1 str, internal_ids: Vec<&'life2 str>, flags: &'life3 Flags ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Replaces envelopes flags matching the given ids from the given
folder.
source§fn remove_flags<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_folder: &'life1 str,
internal_ids: Vec<&'life2 str>,
flags: &'life3 Flags
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn remove_flags<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _folder: &'life1 str, internal_ids: Vec<&'life2 str>, flags: &'life3 Flags ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Removes the given flags to envelopes matching the given ids
from the given folder.
fn as_any(&self) -> &dyn Any
source§fn mark_emails_as_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder: &'life1 str,
ids: Vec<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn mark_emails_as_deleted<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, folder: &'life1 str, ids: Vec<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Alias for adding the Deleted flag to the matching envelopes.
Auto Trait Implementations§
impl RefUnwindSafe for NotmuchBackend
impl Send for NotmuchBackend
impl Sync for NotmuchBackend
impl Unpin for NotmuchBackend
impl UnwindSafe for NotmuchBackend
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
§impl<Src, Dst> ValueInto<Dst> for Srcwhere
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Srcwhere Dst: ValueFrom<Src>,
§fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.