Enum imap_types::fetch::MessageDataItemName
source · pub enum MessageDataItemName<'a> {
Body,
BodyExt {
section: Option<Section<'a>>,
partial: Option<(u32, NonZeroU32)>,
peek: bool,
},
BodyStructure,
Envelope,
Flags,
InternalDate,
Rfc822,
Rfc822Header,
Rfc822Size,
Rfc822Text,
Uid,
}
Expand description
Message data item name used to request a message data item.
Variants§
Body
Non-extensible form of BODYSTRUCTURE
.
BODY
BodyExt
Fields
section: Option<Section<'a>>
The section specification is a set of zero or more part specifiers delimited by periods.
An empty section specification refers to the entire message, including the header.
See crate::fetch::Section
and crate::fetch::PartSpecifier
.
Every message has at least one part number. Non-[MIME-IMB] messages, and non-multipart [MIME-IMB] messages with no encapsulated message, only have a part 1.
Multipart messages are assigned consecutive part numbers, as they occur in the message. If a particular part is of type message or multipart, its parts MUST be indicated by a period followed by the part number within that nested multipart part.
A part of type MESSAGE/RFC822 also has nested part numbers, referring to parts of the MESSAGE part’s body.
partial: Option<(u32, NonZeroU32)>
It is possible to fetch a substring of the designated text. This is done by appending an open angle bracket (“<”), the octet position of the first desired octet, a period, the maximum number of octets desired, and a close angle bracket (“>”) to the part specifier. If the starting octet is beyond the end of the text, an empty string is returned.
Any partial fetch that attempts to read beyond the end of the text is truncated as appropriate. A partial fetch that starts at octet 0 is returned as a partial fetch, even if this truncation happened.
Note: This means that BODY[]<0.2048> of a 1500-octet message will return BODY[]<0> with a literal of size 1500, not BODY[].
Note: A substring fetch of a HEADER.FIELDS or HEADER.FIELDS.NOT part specifier is calculated after subsetting the header.
The text of a particular body section.
BODY[<section>]<<partial>>
BodyStructure
The [MIME-IMB] body structure of a message.
This is computed by the server by parsing the [MIME-IMB] header fields in the [RFC-2822] header and [MIME-IMB] headers.
BODYSTRUCTURE
Envelope
The envelope structure of a message.
This is computed by the server by parsing the [RFC-2822] header into the component parts, defaulting various fields as necessary.
ENVELOPE
Flags
The flags that are set for a message.
FLAGS
InternalDate
The internal date of a message.
INTERNALDATE
Rfc822
Functionally equivalent to BODY[]
.
Differs in the syntax of the resulting untagged FETCH data (RFC822
is returned).
RFC822
Note: BODY[]
is constructed as …
MessageDataItemName::BodyExt {
section: None,
partial: None,
peek: false,
};
Rfc822Header
Functionally equivalent to BODY.PEEK[HEADER]
.
Differs in the syntax of the resulting untagged FETCH data (RFC822.HEADER
is returned).
RFC822.HEADER
Rfc822Size
The [RFC-2822] size of a message.
RFC822.SIZE
Rfc822Text
Functionally equivalent to BODY[TEXT]
.
Differs in the syntax of the resulting untagged FETCH data (RFC822.TEXT
is returned).
RFC822.TEXT
Uid
The unique identifier for a message.
UID
Trait Implementations§
source§impl<'a, 'arbitrary: 'a> Arbitrary<'arbitrary> for MessageDataItemName<'a>
impl<'a, 'arbitrary: 'a> Arbitrary<'arbitrary> for MessageDataItemName<'a>
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a> Clone for MessageDataItemName<'a>
impl<'a> Clone for MessageDataItemName<'a>
source§fn clone(&self) -> MessageDataItemName<'a>
fn clone(&self) -> MessageDataItemName<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for MessageDataItemName<'a>
impl<'a> Debug for MessageDataItemName<'a>
source§impl<'de, 'a> Deserialize<'de> for MessageDataItemName<'a>
impl<'de, 'a> Deserialize<'de> for MessageDataItemName<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl<'a> Hash for MessageDataItemName<'a>
impl<'a> Hash for MessageDataItemName<'a>
source§impl<'a> IntoBoundedStatic for MessageDataItemName<'a>
impl<'a> IntoBoundedStatic for MessageDataItemName<'a>
§type Static = MessageDataItemName<'static>
type Static = MessageDataItemName<'static>
'static
lifetime.source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
T
into an owned T
such that T: 'static
.source§impl<'a> PartialEq<MessageDataItemName<'a>> for MessageDataItemName<'a>
impl<'a> PartialEq<MessageDataItemName<'a>> for MessageDataItemName<'a>
source§fn eq(&self, other: &MessageDataItemName<'a>) -> bool
fn eq(&self, other: &MessageDataItemName<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.