Skip to main content

ResponseCode

Enum ResponseCode 

Source
#[non_exhaustive]
pub enum ResponseCode {
Show 61 variants Alert, BadCharset(Vec<String>), Capability(Vec<Capability>), Parse, PermanentFlags(Vec<Flag>), ReadOnly, ReadWrite, TryCreate, UidNext(u32), UidValidity(u32), Unseen(u32), AppendUid { uid_validity: u32, uids: Vec<UidRange>, }, CopyUid { uid_validity: u32, source_uids: Vec<UidRange>, dest_uids: Vec<UidRange>, }, HighestModSeq(u64), Modified(Vec<UidRange>), NoModSeq, Closed, MailboxId(String), Unavailable, AuthenticationFailed, AuthorizationFailed, Expired, PrivacyRequired, ContactAdmin, NoPerm, InUse, ExpungeIssued, Corruption, ServerBug, ClientBug, Cannot, Limit, OverQuota, AlreadyExists, NonExistent, NewName(Option<String>), Referral(Option<String>), UrlMech(Option<String>), BadUrl(Option<String>), BadComparator(Option<String>), Annotate(Option<String>), Annotations(Option<String>), TempFail(Option<String>), MaxConvertMessages(Option<String>), MaxConvertParts(Option<String>), NoUpdate(Option<String>), NotificationOverflow(Option<String>), BadEvent(Option<String>), UndefinedFilter(Option<String>), UidNotSticky, NotSaved, HasChildren, UnknownCte, TooBig, CompressionActive, UseAttr, MetadataLongEntries(u64), MetadataMaxSize(u64), MetadataTooMany, MetadataNoPrivate, Other { name: String, value: Option<String>, },
}
Expand description

Response code in square brackets (e.g. [UIDVALIDITY 12345]) (RFC 3501 Section 7.1 / RFC 9051 Section 7.1).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Alert

[ALERT] — must be presented to the user (RFC 3501 Section 7.1).

§

BadCharset(Vec<String>)

[BADCHARSET (charsets)] — search charset not supported (RFC 3501 Section 7.1).

§

Capability(Vec<Capability>)

[CAPABILITY ...] — capability list (RFC 3501 Section 7.1).

§

Parse

[PARSE] — message headers could not be parsed (RFC 3501 Section 7.1).

§

PermanentFlags(Vec<Flag>)

[PERMANENTFLAGS (flags)] — flags the client can change permanently (RFC 3501 Section 7.1).

§

ReadOnly

[READ-ONLY] — mailbox is read-only (RFC 3501 Section 7.1).

§

ReadWrite

[READ-WRITE] — mailbox is read-write (RFC 3501 Section 7.1).

§

TryCreate

[TRYCREATE] — attempt to CREATE the target mailbox (RFC 3501 Section 7.1).

§

UidNext(u32)

[UIDNEXT n] — predicted next UID (RFC 3501 Section 7.1).

§

UidValidity(u32)

[UIDVALIDITY n] — UID validity value (RFC 3501 Section 7.1).

§

Unseen(u32)

[UNSEEN n] — first unseen message sequence number (RFC 3501 Section 7.1).

§

AppendUid

[APPENDUID uidvalidity uid-set] (RFC 4315 UIDPLUS Section 3).

For a single APPEND, uids contains one range. For MULTIAPPEND (RFC 3502), uids may contain multiple ranges.

Fields

§uid_validity: u32
§

CopyUid

[COPYUID uidvalidity source-uids dest-uids] (RFC 4315 UIDPLUS).

Fields

§uid_validity: u32
§source_uids: Vec<UidRange>
§dest_uids: Vec<UidRange>
§

HighestModSeq(u64)

[HIGHESTMODSEQ n] (RFC 7162 CONDSTORE).

§

Modified(Vec<UidRange>)

[MODIFIED sequence-set] (RFC 7162 Section 3.1.3 / Section 7).

For STORE, the set contains message sequence numbers. For UID STORE, it contains UIDs.

§

NoModSeq

[NOMODSEQ] — mailbox does not support mod-sequences (RFC 7162 Section 3.1.2).

§

Closed

[CLOSED] — previously selected mailbox is now closed (RFC 7162 QRESYNC).

§

MailboxId(String)

[MAILBOXID (objectid)] — unique mailbox identifier (RFC 8474 Section 5.1).

§

Unavailable

[UNAVAILABLE] — server temporarily unavailable (RFC 5530 Section 3).

§

AuthenticationFailed

[AUTHENTICATIONFAILED] — authentication credentials invalid (RFC 5530 Section 3).

§

AuthorizationFailed

[AUTHORIZATIONFAILED] — authorization identity not permitted (RFC 5530 Section 3).

§

Expired

[EXPIRED] — credentials have expired (RFC 5530 Section 3).

§

PrivacyRequired

[PRIVACYREQUIRED] — operation requires encryption (RFC 5530 Section 3).

§

ContactAdmin

[CONTACTADMIN] — contact server administrator (RFC 5530 Section 3).

§

NoPerm

[NOPERM] — no permission to perform the operation (RFC 5530 Section 3).

§

InUse

[INUSE] — resource is in use by another session (RFC 5530 Section 3).

§

ExpungeIssued

[EXPUNGEISSUED] — expunge occurred during operation (RFC 5530 Section 3).

§

Corruption

[CORRUPTION] — server detected data corruption (RFC 5530 Section 3).

§

ServerBug

[SERVERBUG] — server encountered an internal bug (RFC 5530 Section 3).

§

ClientBug

[CLIENTBUG] — client sent malformed or nonsensical data (RFC 5530 Section 3).

§

Cannot

[CANNOT] — operation is not supported on this mailbox/server (RFC 5530 Section 3).

§

Limit

[LIMIT] — operation exceeds a server-imposed limit (RFC 5530 Section 3).

§

OverQuota

[OVERQUOTA] — user has exceeded their storage quota (RFC 5530 Section 3).

§

AlreadyExists

[ALREADYEXISTS] — mailbox already exists (e.g. on CREATE) (RFC 5530 Section 3).

§

NonExistent

[NONEXISTENT] — mailbox does not exist (e.g. on SELECT/DELETE) (RFC 5530 Section 3).

§

NewName(Option<String>)

[NEWNAME ...] — registered response code, obsolete but still standardized; trailing data is preserved verbatim (RFC 5530 Section 6).

§

Referral(Option<String>)

[REFERRAL ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

UrlMech(Option<String>)

[URLMECH ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

BadUrl(Option<String>)

[BADURL ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

BadComparator(Option<String>)

[BADCOMPARATOR ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

Annotate(Option<String>)

[ANNOTATE ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

Annotations(Option<String>)

[ANNOTATIONS ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

TempFail(Option<String>)

[TEMPFAIL ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

MaxConvertMessages(Option<String>)

[MAXCONVERTMESSAGES ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

MaxConvertParts(Option<String>)

[MAXCONVERTPARTS ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

NoUpdate(Option<String>)

[NOUPDATE ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5530 Section 6).

§

NotificationOverflow(Option<String>)

[NOTIFICATIONOVERFLOW ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5465 Section 5.8 / RFC 5530 Section 6).

§

BadEvent(Option<String>)

[BADEVENT ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5465 Section 5 / RFC 5530 Section 6).

§

UndefinedFilter(Option<String>)

[UNDEFINED-FILTER ...] — registered response code; trailing data is preserved verbatim for consumers (RFC 5465 Section 8 / RFC 5530 Section 6).

§

UidNotSticky

[UIDNOTSTICKY] — assigned UIDs are not persistent (RFC 4315 Section 2 / RFC 9051 Section 7.1).

§

NotSaved

[NOTSAVED] — search result variable $ is empty (RFC 5182 Section 2.1).

§

HasChildren

[HASCHILDREN] — mailbox has child mailboxes (RFC 9051 Section 7.1).

§

UnknownCte

[UNKNOWN-CTE] — BINARY fetch failed due to unknown CTE (RFC 3516 Section 4.3).

§

TooBig

[TOOBIG] — message too large for APPEND (RFC 7889 Section 4).

§

CompressionActive

[COMPRESSIONACTIVE] — compression layer already active (RFC 4978 Section 3).

§

UseAttr

[USEATTR] — special-use attribute not supported (RFC 6154 Section 6).

§

MetadataLongEntries(u64)

[METADATA LONGENTRIES n] — entry values were truncated at n bytes (RFC 5464 Section 4.2.1).

§

MetadataMaxSize(u64)

[METADATA MAXSIZE n] — server’s maximum annotation size (RFC 5464 Section 4.3).

§

MetadataTooMany

[METADATA TOOMANY] — too many annotations on this mailbox (RFC 5464 Section 4.3).

§

MetadataNoPrivate

[METADATA NOPRIVATE] — server does not support private annotations (RFC 5464 Section 4.3).

§

Other

Unrecognized response code — preserved for forward compatibility.

Fields

§name: String

Trait Implementations§

Source§

impl Clone for ResponseCode

Source§

fn clone(&self) -> ResponseCode

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 ResponseCode

Source§

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

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

impl Hash for ResponseCode

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 ResponseCode

Source§

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

Source§

impl StructuralPartialEq for ResponseCode

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