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>
impl<'a> Debug for ResponseCode<'a>
Source§impl<'a> PartialEq for ResponseCode<'a>
impl<'a> PartialEq for ResponseCode<'a>
Source§fn eq(&self, other: &ResponseCode<'a>) -> bool
fn eq(&self, other: &ResponseCode<'a>) -> bool
self and other values to be equal, and is used by ==.