#[non_exhaustive]pub struct ParsedMessage {
pub part_index: ParsedPart,
pub text_body: Vec<String>,
pub html_body: Vec<String>,
pub attachments: Vec<String>,
pub headers: Vec<ParsedHeader>,
pub preview: Option<String>,
pub warnings: Vec<String>,
}Expand description
The result of parse().
All fields are owned. No lifetime parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.part_index: ParsedPartThe MIME part tree rooted at the message.
text_body: Vec<String>Part IDs of text/plain body parts, per RFC 8621 §4.1.4.
html_body: Vec<String>Part IDs of text/html body parts, per RFC 8621 §4.1.4.
attachments: Vec<String>Part IDs of attachment parts, per RFC 8621 §4.1.4.
headers: Vec<ParsedHeader>Top-level message headers.
preview: Option<String>Short preview of the message body (first ~256 chars of text content).
None when there is no text body part, when the first text part is
empty, or when decoding the first text part fails (e.g. unsupported
charset or transfer-encoding error).
warnings: Vec<String>Non-fatal parse warnings (e.g. unknown CTE, out-of-range part indices, encoding problems).
§Stability
Warning strings are human-readable diagnostic messages. Their
exact wording, count, and order are not stable across minor
versions — do not match on them programmatically. Use
warnings.is_empty() to check for a clean parse; log the
contents for debugging.
Trait Implementations§
Source§impl Clone for ParsedMessage
impl Clone for ParsedMessage
Source§fn clone(&self) -> ParsedMessage
fn clone(&self) -> ParsedMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParsedMessage
impl Debug for ParsedMessage
Source§impl<'de> Deserialize<'de> for ParsedMessage
impl<'de> Deserialize<'de> for ParsedMessage
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>,
impl Eq for ParsedMessage
Source§impl PartialEq for ParsedMessage
impl PartialEq for ParsedMessage
Source§fn eq(&self, other: &ParsedMessage) -> bool
fn eq(&self, other: &ParsedMessage) -> bool
self and other values to be equal, and is used by ==.