pub enum Flag {
Seen,
Answered,
Flagged,
Deleted,
Draft,
Custom(String),
}
Expand description
The email envelope flag.
A flag is like a tag that can be attached to an email
envelope. The concept of flag is the same across backends, but
their definition may vary. For example, the flag representing
answered emails is called \Answered
for IMAP backend but is
called R
(replied) for Maildir backend. This implementation
tries to be as simple as possible and should fit most of the use
cases.
Variants§
Seen
Flag used when the email envelope has been opened.
Answered
Flag used when the email has been answered.
Flagged
Flag used as a bookmark. The meaning is specific to the user: it could be important, starred, to check etc.
Deleted
Flag used when the email is marked for deletion.
Draft
Flag used when the email is a draft and is therefore not complete.
Custom(String)
Flag used for all other use cases.
Implementations§
Trait Implementations§
Source§impl From<&str> for Flag
Parse a flag from a string. If the string does not match any of
the existing variant, it is considered as custom.
impl From<&str> for Flag
Parse a flag from a string. If the string does not match any of the existing variant, it is considered as custom.
Source§impl FromIterator<Flag> for Flags
impl FromIterator<Flag> for Flags
Source§impl FromStr for Flag
Parse a flag from a string. If the string does not match any of
the existing variant, it returns an error.
impl FromStr for Flag
Parse a flag from a string. If the string does not match any of the existing variant, it returns an error.
Source§impl Ord for Flag
impl Ord for Flag
Source§impl PartialOrd for Flag
impl PartialOrd for Flag
impl Eq for Flag
impl StructuralPartialEq for Flag
Auto Trait Implementations§
impl Freeze for Flag
impl RefUnwindSafe for Flag
impl Send for Flag
impl Sync for Flag
impl Unpin for Flag
impl UnwindSafe for Flag
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