Enum imap_types::search::SearchKey
source · pub enum SearchKey<'a> {
Show 37 variants
And(NonEmptyVec<SearchKey<'a>>),
SequenceSet(SequenceSet),
All,
Answered,
Bcc(AString<'a>),
Before(NaiveDate),
Body(AString<'a>),
Cc(AString<'a>),
Deleted,
Draft,
Flagged,
From(AString<'a>),
Header(AString<'a>, AString<'a>),
Keyword(Atom<'a>),
Larger(u32),
New,
Not(Box<SearchKey<'a>>),
Old,
On(NaiveDate),
Or(Box<SearchKey<'a>>, Box<SearchKey<'a>>),
Recent,
Seen,
SentBefore(NaiveDate),
SentOn(NaiveDate),
SentSince(NaiveDate),
Since(NaiveDate),
Smaller(u32),
Subject(AString<'a>),
Text(AString<'a>),
To(AString<'a>),
Uid(SequenceSet),
Unanswered,
Undeleted,
Undraft,
Unflagged,
Unkeyword(Atom<'a>),
Unseen,
}
Expand description
The defined search keys.
Variants§
And(NonEmptyVec<SearchKey<'a>>)
SequenceSet(SequenceSet)
Messages with message sequence numbers corresponding to the specified message sequence number set.
All
All messages in the mailbox; the default initial key for ANDing.
Answered
Messages with the \Answered flag set.
Bcc(AString<'a>)
Messages that contain the specified string in the envelope structure’s BCC field.
Before(NaiveDate)
Messages whose internal date (disregarding time and timezone) is earlier than the specified date.
Body(AString<'a>)
Messages that contain the specified string in the body of the message.
Cc(AString<'a>)
Messages that contain the specified string in the envelope structure’s CC field.
Deleted
Messages with the \Deleted flag set.
Draft
Messages with the \Draft flag set.
Flagged
Messages with the \Flagged flag set.
From(AString<'a>)
Messages that contain the specified string in the envelope structure’s FROM field.
Header(AString<'a>, AString<'a>)
Messages that have a header with the specified field-name (as defined in [RFC-2822]) and that contains the specified string in the text of the header (what comes after the colon). If the string to search is zero-length, this matches all messages that have a header line with the specified field-name regardless of the contents.
Keyword(Atom<'a>)
Messages with the specified keyword flag set.
Larger(u32)
Messages with an [RFC-2822] size larger than the specified number of octets.
New
Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to “(RECENT UNSEEN)”.
Not(Box<SearchKey<'a>>)
Messages that do not match the specified search key.
Old
Messages that do not have the \Recent flag set. This is functionally equivalent to “NOT RECENT” (as opposed to “NOT NEW”).
On(NaiveDate)
Messages whose internal date (disregarding time and timezone) is within the specified date.
Or(Box<SearchKey<'a>>, Box<SearchKey<'a>>)
Messages that match either search key.
Recent
Messages that have the \Recent flag set.
Seen
Messages that have the \Seen flag set.
SentBefore(NaiveDate)
Messages whose [RFC-2822] Date: header (disregarding time and timezone) is earlier than the specified date.
SentOn(NaiveDate)
Messages whose [RFC-2822] Date: header (disregarding time and timezone) is within the specified date.
SentSince(NaiveDate)
Messages whose [RFC-2822] Date: header (disregarding time and timezone) is within or later than the specified date.
Since(NaiveDate)
Messages whose internal date (disregarding time and timezone) is within or later than the specified date.
Smaller(u32)
Messages with an [RFC-2822] size smaller than the specified number of octets.
Subject(AString<'a>)
Messages that contain the specified string in the envelope structure’s SUBJECT field.
Text(AString<'a>)
Messages that contain the specified string in the header or body of the message.
To(AString<'a>)
Messages that contain the specified string in the envelope structure’s TO field.
Uid(SequenceSet)
Messages with unique identifiers corresponding to the specified unique identifier set. Sequence set ranges are permitted.
Unanswered
Messages that do not have the \Answered flag set.
Undeleted
Messages that do not have the \Deleted flag set.
Undraft
Messages that do not have the \Draft flag set.
Unflagged
Messages that do not have the \Flagged flag set.
Unkeyword(Atom<'a>)
Messages that do not have the specified keyword flag set.
Unseen
Messages that do not have the \Seen flag set.
Implementations§
Trait Implementations§
source§impl<'a> Arbitrary<'a> for SearchKey<'a>
impl<'a> Arbitrary<'a> for SearchKey<'a>
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read more