pub enum ImapCommand {
Show 30 variants
Capability,
Login {
username: String,
password: String,
},
Logout,
List {
reference: String,
pattern: String,
},
Select {
mailbox: String,
},
Examine {
mailbox: String,
},
Fetch {
sequence: String,
attributes: String,
},
Store {
sequence: String,
action: String,
flags: String,
},
Search {
criteria: String,
},
Expunge,
Noop,
Close,
Idle,
Append {
mailbox: String,
flags: Option<String>,
literal_size: u32,
},
Copy {
sequence: String,
mailbox: String,
},
Move {
sequence: String,
mailbox: String,
},
Uid {
subcommand: Box<ImapCommand>,
},
Status {
mailbox: String,
items: String,
},
GetQuota {
quotaroot: String,
},
GetQuotaRoot {
mailbox: String,
},
Create {
mailbox: String,
},
Delete {
mailbox: String,
},
Rename {
from: String,
to: String,
},
Subscribe {
mailbox: String,
},
Unsubscribe {
mailbox: String,
},
Lsub {
reference: String,
pattern: String,
},
Namespace,
Sort {
criteria: String,
charset: String,
search_criteria: String,
},
Enable(Vec<String>),
Unselect,
}Expand description
A parsed IMAP4rev1 command. Each variant owns its argument strings (commands cross network boundaries, so we don’t borrow).
Variants§
Capability
CAPABILITY — list supported extensions.
Login
LOGIN <user> <pass> — authenticate with plain credentials.
Fields
Logout
LOGOUT — close the connection.
List
LIST <reference> <pattern> — enumerate matching mailbox names.
Fields
Select
SELECT <mailbox> — open a mailbox for read/write.
Examine
EXAMINE <mailbox> — open a mailbox read-only.
Fetch
FETCH <seq> <attrs> — retrieve message attributes / parts.
Fields
Store
STORE <seq> <action> <flags> — set/add/remove flags.
Fields
Search
SEARCH <criteria> — return UIDs matching the search keys.
Expunge
EXPUNGE — purge messages with the \Deleted flag.
Noop
NOOP — no-op (kept for keepalive + STATUS-update side effect).
Close
CLOSE — close the current mailbox (expunge implicit).
Idle
IDLE — push notifications until DONE (RFC 2177).
Append
APPEND <mailbox> [flags] {n}<CRLF>... — upload a new message.
Fields
Copy
COPY <seq> <mailbox> — copy messages to another mailbox.
Fields
Move
MOVE <seq> <mailbox> (RFC 6851) — move messages.
Fields
Uid
UID <subcommand> — re-interpret the subcommand’s sequence set as UIDs.
Fields
subcommand: Box<ImapCommand>The nested IMAP command operating on UIDs.
Status
STATUS <mailbox> <items> — read mailbox-level counts.
Fields
GetQuota
GETQUOTA <quotaroot> — read a quota resource (RFC 2087).
GetQuotaRoot
GETQUOTAROOT <mailbox> — list quota roots applying to a mailbox.
Create
CREATE <mailbox> — create a mailbox.
Delete
DELETE <mailbox> — delete a mailbox.
Rename
RENAME <from> <to> — rename a mailbox.
Subscribe
SUBSCRIBE <mailbox> — add a mailbox to the user’s active list.
Unsubscribe
UNSUBSCRIBE <mailbox> — remove from subscription list.
Lsub
LSUB <reference> <pattern> — list subscribed mailboxes.
Namespace
NAMESPACE — return per-user / per-shared / per-other namespace prefixes.
Sort
SORT <criteria> <charset> <search> — server-side sorted SEARCH
(RFC 5256).
Fields
Enable(Vec<String>)
ENABLE <ext>+ (RFC 5161) — opt into named extensions.
Unselect
UNSELECT (RFC 3691) — close mailbox without expunging.
Trait Implementations§
Source§impl Clone for ImapCommand
impl Clone for ImapCommand
Source§fn clone(&self) -> ImapCommand
fn clone(&self) -> ImapCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImapCommand
impl Debug for ImapCommand
Source§impl PartialEq for ImapCommand
impl PartialEq for ImapCommand
Source§fn eq(&self, other: &ImapCommand) -> bool
fn eq(&self, other: &ImapCommand) -> bool
self and other values to be equal, and is used by ==.