Skip to main content

FetchResponse

Struct FetchResponse 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§seq: u32

Message 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

Source§

fn clone(&self) -> FetchResponse

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FetchResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FetchResponse

Source§

fn default() -> FetchResponse

Returns the “default value” for a type. Read more
Source§

impl Hash for FetchResponse

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FetchResponse

Source§

fn eq(&self, other: &FetchResponse) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for FetchResponse

Source§

impl StructuralPartialEq for FetchResponse

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more