Skip to main content

FetchAttribute

Enum FetchAttribute 

Source
pub enum FetchAttribute<'a> {
    Flags(Vec<&'a str>),
    InternalDate(&'a str),
    Rfc822Size(u32),
    Rfc822(&'a [u8]),
    Rfc822Header(&'a [u8]),
    Rfc822Text(&'a [u8]),
    Envelope(&'a [u8]),
    Body(&'a [u8]),
    BodyStructure(&'a [u8]),
    BodySection {
        section: Option<&'a str>,
        origin: Option<u32>,
        data: Option<&'a [u8]>,
    },
    Uid(u32),
}
Expand description

A single attribute returned in a FETCH data response.

Variants§

§

Flags(Vec<&'a str>)

FLAGS — the flags set on the message.

§

InternalDate(&'a str)

INTERNALDATE — the server-side receipt timestamp (raw quoted string).

§

Rfc822Size(u32)

RFC822.SIZE — the message size in octets.

§

Rfc822(&'a [u8])

Full RFC822 message (legacy alias for BODY[]).

§

Rfc822Header(&'a [u8])

RFC822.HEADER — the message header (legacy alias for BODY[HEADER]).

§

Rfc822Text(&'a [u8])

RFC822.TEXT — the message body text (legacy alias for BODY[TEXT]).

§

Envelope(&'a [u8])

Parsed-form ENVELOPE bytes (raw, including outer parens).

§

Body(&'a [u8])

BODY (no section) — non-extensible body structure as raw bytes.

§

BodyStructure(&'a [u8])

BODYSTRUCTURE — extensible body structure as raw bytes.

§

BodySection

BODY[<section>]<<origin>> with the data as raw bytes.

Fields

§section: Option<&'a str>

The section specifier (e.g. HEADER, 1.2.TEXT), or None for BODY[].

§origin: Option<u32>

The starting octet offset for a partial (<origin>) fetch, if any.

§data: Option<&'a [u8]>

The section data, or None if the server returned NIL.

§

Uid(u32)

UID — the unique identifier of the message.

Trait Implementations§

Source§

impl<'a> Debug for FetchAttribute<'a>

Source§

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

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

impl<'a> PartialEq for FetchAttribute<'a>

Source§

fn eq(&self, other: &FetchAttribute<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'a> Eq for FetchAttribute<'a>

Source§

impl<'a> StructuralPartialEq for FetchAttribute<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for FetchAttribute<'a>

§

impl<'a> RefUnwindSafe for FetchAttribute<'a>

§

impl<'a> Send for FetchAttribute<'a>

§

impl<'a> Sync for FetchAttribute<'a>

§

impl<'a> Unpin for FetchAttribute<'a>

§

impl<'a> UnsafeUnpin for FetchAttribute<'a>

§

impl<'a> UnwindSafe for FetchAttribute<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.