pub enum PartSpecifier<'a> {
PartNumber(u32),
Header,
HeaderFields(NonEmptyVec<AString<'a>>),
HeaderFieldsNot(NonEmptyVec<AString<'a>>),
Mime,
Text,
}
Expand description
A part specifier is either a part number or one of the following:
HEADER
, HEADER.FIELDS
, HEADER.FIELDS.NOT
, MIME
, and TEXT
.
The HEADER, HEADER.FIELDS, and HEADER.FIELDS.NOT part specifiers refer to the [RFC-2822] header of the message or of an encapsulated [MIME-IMT] MESSAGE/RFC822 message. HEADER.FIELDS and HEADER.FIELDS.NOT are followed by a list of field-name (as defined in [RFC-2822]) names, and return a subset of the header.
The field-matching is case-insensitive but otherwise exact. Subsetting does not exclude the [RFC-2822] delimiting blank line between the header and the body; the blank line is included in all header fetches, except in the case of a message which has no body and no blank line.
Variants§
PartNumber(u32)
Header
HeaderFields(NonEmptyVec<AString<'a>>)
HeaderFieldsNot(NonEmptyVec<AString<'a>>)
Mime
Text
Trait Implementations§
Source§impl<'a> Clone for PartSpecifier<'a>
impl<'a> Clone for PartSpecifier<'a>
Source§fn clone(&self) -> PartSpecifier<'a>
fn clone(&self) -> PartSpecifier<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for PartSpecifier<'a>
impl<'a> Debug for PartSpecifier<'a>
Source§impl<'de, 'a> Deserialize<'de> for PartSpecifier<'a>
impl<'de, 'a> Deserialize<'de> for PartSpecifier<'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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Hash for PartSpecifier<'a>
impl<'a> Hash for PartSpecifier<'a>
Source§impl<'a> IntoBoundedStatic for PartSpecifier<'a>
impl<'a> IntoBoundedStatic for PartSpecifier<'a>
Source§type Static = PartSpecifier<'static>
type Static = PartSpecifier<'static>
The target type is bounded by the
'static
lifetime.Source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
Convert an owned
T
into an owned T
such that T: 'static
.Source§impl<'a> PartialEq for PartSpecifier<'a>
impl<'a> PartialEq for PartSpecifier<'a>
Source§impl<'a> Serialize for PartSpecifier<'a>
impl<'a> Serialize for PartSpecifier<'a>
Source§impl<'a> ToBoundedStatic for PartSpecifier<'a>
impl<'a> ToBoundedStatic for PartSpecifier<'a>
impl<'a> Eq for PartSpecifier<'a>
impl<'a> StructuralPartialEq for PartSpecifier<'a>
Auto Trait Implementations§
impl<'a> Freeze for PartSpecifier<'a>
impl<'a> RefUnwindSafe for PartSpecifier<'a>
impl<'a> Send for PartSpecifier<'a>
impl<'a> Sync for PartSpecifier<'a>
impl<'a> Unpin for PartSpecifier<'a>
impl<'a> UnwindSafe for PartSpecifier<'a>
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
Mutably borrows from an owned value. Read more