#[non_exhaustive]pub struct FetchResponse {Show 15 fields
pub seq: u32,
pub uid: Option<u32>,
pub flags: Option<Vec<Flag>>,
pub envelope: Option<Envelope>,
pub body_structure: Option<BodyStructure>,
pub rfc822_size: Option<u64>,
pub internal_date: Option<String>,
pub body_sections: Vec<BodySection>,
pub mod_seq: Option<u64>,
pub save_date: Option<String>,
pub binary_sections: Vec<BinarySection>,
pub binary_sizes: Vec<(Vec<u32>, u64)>,
pub preview: Option<String>,
pub email_id: Option<String>,
pub thread_id: Option<String>,
}Expand description
A parsed FETCH response for a single message (RFC 3501 Section 7.4.2 / RFC 9051 Section 7.5.2).
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.seq: u32Message sequence number (RFC 3501 Section 7.4.2 / RFC 9051 Section 7.5.2).
uid: Option<u32>UID value (RFC 3501 Section 2.3.1.1).
flags: Option<Vec<Flag>>FLAGS value (RFC 3501 Section 2.3.2).
envelope: Option<Envelope>Parsed ENVELOPE (RFC 3501 Section 7.4.2).
body_structure: Option<BodyStructure>Parsed BODYSTRUCTURE (RFC 3501 Section 7.4.2).
rfc822_size: Option<u64>RFC822.SIZE in bytes (RFC 3501 Section 7.4.2 / RFC 9051 Section 7.5.2).
RFC 9051 widens this from number to number64 to support messages > 4 GiB.
internal_date: Option<String>INTERNALDATE timestamp string (RFC 3501 Section 7.4.2).
The date-time string in IMAP format, e.g. "17-Jul-1996 02:44:25 -0700".
body_sections: Vec<BodySection>Fetched body sections per BODY[section]<partial> (RFC 3501 Section 6.4.5).
mod_seq: Option<u64>MODSEQ value (RFC 7162 CONDSTORE Section 3.1.3).
save_date: Option<String>SAVEDATE timestamp string (RFC 8514 Section 3).
The date-time when the message was saved to the mailbox, or None if
the server returned NIL (message predates SAVEDATE tracking).
binary_sections: Vec<BinarySection>BINARY[section] data items (RFC 3516 Section 4.2).
binary_sizes: Vec<(Vec<u32>, u64)>BINARY.SIZE[section] values (RFC 3516 Section 4.3 / RFC 9051 Section 7.5.2).
Each entry is (section_parts, size_in_bytes).
RFC 9051 Section 9 defines the size as number (u32), but stored as
u64 for Postel’s-law leniency with servers that send larger values.
preview: Option<String>PREVIEW text (RFC 8970 Section 3).
A short plaintext snippet of the message, or None if the server
returned NIL (e.g., for LAZY requests where the preview is not yet computed).
email_id: Option<String>EMAILID value (RFC 8474 Section 4).
A server-assigned unique identifier for this particular instance of a message.
The value is an objectid string (1-255 alphanumeric/dash/underscore characters).
thread_id: Option<String>THREADID value (RFC 8474 Section 4).
A server-assigned identifier grouping related messages into threads,
or None if the server returned NIL (no thread association).
Trait Implementations§
Source§impl Clone for FetchResponse
impl Clone for FetchResponse
Source§fn clone(&self) -> FetchResponse
fn clone(&self) -> FetchResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more