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.
BODYBodyExt
The text of a particular body section.
BODY[<section>]<<partial>>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.
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.
BODYSTRUCTUREEnvelope
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.
ENVELOPEFlags
The flags that are set for a message.
FLAGSInternalDate
The internal date of a message.
INTERNALDATERfc822
Functionally equivalent to BODY[].
Differs in the syntax of the resulting untagged FETCH data (RFC822 is returned).
RFC822Note: 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.HEADERRfc822Size
The [RFC-2822] size of a message.
RFC822.SIZERfc822Text
Functionally equivalent to BODY[TEXT].
Differs in the syntax of the resulting untagged FETCH data (RFC822.TEXT is returned).
RFC822.TEXTUid
The unique identifier for a message.
UIDTrait 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§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. 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>
Source§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.