pub enum SearchEmailsFilterQuery {
And(Box<SearchEmailsFilterQuery>, Box<SearchEmailsFilterQuery>),
Or(Box<SearchEmailsFilterQuery>, Box<SearchEmailsFilterQuery>),
Not(Box<SearchEmailsFilterQuery>),
Date(NaiveDate),
BeforeDate(NaiveDate),
AfterDate(NaiveDate),
From(String),
To(String),
Subject(String),
Body(String),
Flag(Flag),
}
Expand description
The search emails filter query.
The filter query is composed of 3 operators (and, or, not) and 9 conditions (date, before date, after date, from, to, subject, body and flag).
Variants§
And(Box<SearchEmailsFilterQuery>, Box<SearchEmailsFilterQuery>)
Filter emails that match the 2 given conditions.
Or(Box<SearchEmailsFilterQuery>, Box<SearchEmailsFilterQuery>)
Filter emails that match one of the 2 given conditions.
Not(Box<SearchEmailsFilterQuery>)
Filter emails that does not match the given condition.
Date(NaiveDate)
Filter emails where the Date
header of the message matches
the given date.
Only the year, the month and the day are taken into consideration.
BeforeDate(NaiveDate)
Filter emails where the Date
header of the message is
strictly less than the given date.
For example, for a given date 2024-01-01
, it will match
messages with a date starting from 2023-12-31
and
below. Only the year, the month and the day are taken into
consideration.
AfterDate(NaiveDate)
Filter emails where the Date
header of the message is
strictly greater than the given date.
For example, for a given date 2024-01-01
, it will match
messages with a date starting from 2024-01-02
and
above. Only the year, the month and the day are taken into
consideration.
From(String)
Filter emails where the From
header of the message contains
the given pattern.
To(String)
Filter emails where the To
header of the message contains
the given pattern.
Subject(String)
Filter emails where the Subject
header of the message
contains the given pattern.
Body(String)
Filter emails where one of the text body of the message contains the given pattern.
Flag(Flag)
Filter emails where the given flag is included in the email envelope flags.
Implementations§
Source§impl SearchEmailsFilterQuery
impl SearchEmailsFilterQuery
pub fn to_imap_search_criterion(&self) -> SearchKey<'static>
Source§impl SearchEmailsFilterQuery
impl SearchEmailsFilterQuery
pub fn matches_maildir_search_query( &self, envelope: &Envelope, msg_path: &Path, ) -> bool
Trait Implementations§
Source§impl Clone for SearchEmailsFilterQuery
impl Clone for SearchEmailsFilterQuery
Source§fn clone(&self) -> SearchEmailsFilterQuery
fn clone(&self) -> SearchEmailsFilterQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SearchEmailsFilterQuery
impl Debug for SearchEmailsFilterQuery
Source§impl Ord for SearchEmailsFilterQuery
impl Ord for SearchEmailsFilterQuery
Source§fn cmp(&self, other: &SearchEmailsFilterQuery) -> Ordering
fn cmp(&self, other: &SearchEmailsFilterQuery) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SearchEmailsFilterQuery
impl PartialEq for SearchEmailsFilterQuery
Source§impl PartialOrd for SearchEmailsFilterQuery
impl PartialOrd for SearchEmailsFilterQuery
impl Eq for SearchEmailsFilterQuery
impl StructuralPartialEq for SearchEmailsFilterQuery
Auto Trait Implementations§
impl Freeze for SearchEmailsFilterQuery
impl RefUnwindSafe for SearchEmailsFilterQuery
impl Send for SearchEmailsFilterQuery
impl Sync for SearchEmailsFilterQuery
impl Unpin for SearchEmailsFilterQuery
impl UnwindSafe for SearchEmailsFilterQuery
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more