pub struct Capabilities {Show 17 fields
pub imap4rev1: bool,
pub imap4rev2: bool,
pub starttls: bool,
pub login_disabled: bool,
pub idle: bool,
pub unselect: bool,
pub condstore: bool,
pub qresync: bool,
pub move_ext: bool,
pub uidplus: bool,
pub literal_plus: bool,
pub literal_minus: bool,
pub enable: bool,
pub auth_plain: bool,
pub auth_login: bool,
pub auth_xoauth2: bool,
pub auth_oauthbearer: bool,
}Expand description
Parsed view of a server’s advertised IMAP capabilities.
Each field is true when the corresponding capability atom was present
in the server’s CAPABILITY list. Unknown atoms are ignored.
Fields§
§imap4rev1: boolIMAP4rev1 (RFC 3501) base protocol.
imap4rev2: boolIMAP4rev2 (RFC 9051) base protocol.
starttls: boolSTARTTLS — cleartext-to-TLS upgrade is supported.
login_disabled: boolLOGINDISABLED — the LOGIN command is refused (typically pre-TLS).
idle: boolIDLE (RFC 2177) — server-pushed mailbox updates.
unselect: boolUNSELECT (RFC 3691) — leave the selected mailbox without expunging.
condstore: boolCONDSTORE (RFC 7162) — conditional store / mod-sequences.
qresync: boolQRESYNC (RFC 7162) — quick mailbox resynchronization.
move_ext: boolMOVE (RFC 6851) — atomic message move.
uidplus: boolUIDPLUS (RFC 4315) — UID EXPUNGE and assigned-UID responses.
literal_plus: boolLITERAL+ (RFC 7888) — non-synchronizing literals.
literal_minus: boolLITERAL- (RFC 7888) — non-synchronizing literals capped at 4096 octets.
enable: boolENABLE (RFC 5161) — opt into extensions for the session.
auth_plain: boolAUTH=PLAIN SASL mechanism.
auth_login: boolAUTH=LOGIN SASL mechanism.
auth_xoauth2: boolAUTH=XOAUTH2 SASL mechanism.
auth_oauthbearer: boolAUTH=OAUTHBEARER (RFC 7628) SASL mechanism.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn from_atoms<S: AsRef<str>>(atoms: &[S]) -> Self
pub fn from_atoms<S: AsRef<str>>(atoms: &[S]) -> Self
Build from a list of capability atoms (e.g. as produced by the
parser’s * CAPABILITY … data response). Unknown atoms are
ignored.
Sourcepub fn try_update_from(&mut self, response: &Response<'_>) -> bool
pub fn try_update_from(&mut self, response: &Response<'_>) -> bool
Update from a parsed Response if it carries capabilities — either
a * CAPABILITY … data response or a [CAPABILITY …] response code
on a status response. Returns true if anything was updated.
Sourcepub fn from_frame(frame: &[u8]) -> Option<Self>
pub fn from_frame(frame: &[u8]) -> Option<Self>
Best-effort parse of a raw frame. Returns Some(caps) if the bytes
contain a CAPABILITY response (data or response-code); else None.
Sourcepub fn parse(response: &str) -> Self
pub fn parse(response: &str) -> Self
Substring-based parser kept for backward compatibility. Prefer
Self::from_atoms or Self::from_frame — those use the real
parser and avoid prefix collisions like IMAP4REV2X.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more