Skip to main content

ResponseCode

Enum ResponseCode 

Source
pub enum ResponseCode<'a> {
    Alert,
    BadCharset(Vec<&'a str>),
    Capability(Vec<&'a str>),
    Parse,
    PermanentFlags(Vec<&'a str>),
    ReadOnly,
    ReadWrite,
    TryCreate,
    UidNext(u32),
    UidValidity(u32),
    Unseen(u32),
    Other(&'a str, Option<&'a str>),
}
Expand description

A machine-readable response code carried in [...] (RFC 9051 §7.1).

Variants§

§

Alert

ALERT — text that must be shown to the user.

§

BadCharset(Vec<&'a str>)

BADCHARSET — the requested charset(s) are unsupported; the list of charsets the server does support.

§

Capability(Vec<&'a str>)

CAPABILITY — the server’s capability list.

§

Parse

PARSE — the server failed to parse a message’s header/MIME structure.

§

PermanentFlags(Vec<&'a str>)

PERMANENTFLAGS — flags the client can change permanently in the mailbox.

§

ReadOnly

READ-ONLY — the mailbox was selected read-only.

§

ReadWrite

READ-WRITE — the mailbox was selected read-write.

§

TryCreate

TRYCREATE — the target mailbox does not exist; create it and retry.

§

UidNext(u32)

UIDNEXT — the predicted next UID value for the mailbox.

§

UidValidity(u32)

UIDVALIDITY — the mailbox’s UID validity value.

§

Unseen(u32)

UNSEEN — the sequence number of the first unseen message.

§

Other(&'a str, Option<&'a str>)

Unrecognized response code: [ATOM] or [ATOM SP rest].

Trait Implementations§

Source§

impl<'a> Debug for ResponseCode<'a>

Source§

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

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

impl<'a> PartialEq for ResponseCode<'a>

Source§

fn eq(&self, other: &ResponseCode<'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 ResponseCode<'a>

Source§

impl<'a> StructuralPartialEq for ResponseCode<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ResponseCode<'a>

§

impl<'a> RefUnwindSafe for ResponseCode<'a>

§

impl<'a> Send for ResponseCode<'a>

§

impl<'a> Sync for ResponseCode<'a>

§

impl<'a> Unpin for ResponseCode<'a>

§

impl<'a> UnsafeUnpin for ResponseCode<'a>

§

impl<'a> UnwindSafe for ResponseCode<'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.