Enum imap_codec::flag::Flag
source · pub enum Flag<'a> {
Seen,
Answered,
Flagged,
Deleted,
Draft,
Extension(FlagExtension<'a>),
Keyword(Atom<'a>),
}
Expand description
There are two types of flags in IMAP4rev1: System and keyword flags.
A system flag is a flag name that is pre-defined in RFC3501.
All system flags begin with “" and certain system flags (\Deleted
and \Seen
) have special semantics.
Flags that begin with “" but are not pre-defined system flags, are extension flags.
Clients MUST accept them and servers MUST NOT send them except when defined by future standard or standards-track revisions.
A keyword is defined by the server implementation.
Keywords do not begin with “" and servers may permit the client to define new ones
in the mailbox by sending the “*” flag (FlagPerm::AllowNewKeywords
) in the PERMANENTFLAGS response..
Note that a flag of either type can be permanent or session-only.
Variants§
Seen
Message has been read (\Seen
).
Answered
Message has been answered (\Answered
).
Flagged
Message is “flagged” for urgent/special attention (\Flagged
).
Deleted
Message is “deleted” for removal by later EXPUNGE (\Deleted
).
Draft
Message has not completed composition (marked as a draft) (\Draft
).
Extension(FlagExtension<'a>)
A future expansion of a system flag.
Keyword(Atom<'a>)
A keyword.
Implementations§
source§impl<'a> Flag<'a>
impl<'a> Flag<'a>
pub fn system<A>( value: A ) -> Result<Flag<'a>, FlagError<'a, <A as TryInto<Atom<'a>>>::Error>>where A: TryInto<Atom<'a>>,
pub fn extension<A>( value: A ) -> Result<Flag<'a>, FlagError<'a, <A as TryInto<Atom<'a>>>::Error>>where A: TryInto<Atom<'a>>,
pub fn system_or_extension(atom: Atom<'a>) -> Flag<'a>
Trait Implementations§
source§impl<'a, 'arbitrary> Arbitrary<'arbitrary> for Flag<'a>where
'arbitrary: 'a,
impl<'a, 'arbitrary> Arbitrary<'arbitrary> for Flag<'a>where 'arbitrary: 'a,
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Flag<'a>, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Flag<'a>, Error>
Self
from the given unstructured data. Read moresource§impl<'de, 'a> Deserialize<'de> for Flag<'a>
impl<'de, 'a> Deserialize<'de> for Flag<'a>
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Flag<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Flag<'a>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl<'a> IntoBoundedStatic for Flag<'a>
impl<'a> IntoBoundedStatic for Flag<'a>
source§fn into_static(self) -> <Flag<'a> as IntoBoundedStatic>::Static
fn into_static(self) -> <Flag<'a> as IntoBoundedStatic>::Static
T
into an owned T
such that T: 'static
.