#[non_exhaustive]pub enum NotifyEvent {
MessageNew {
fetch_attrs: Vec<String>,
},
MessageExpunge,
FlagChange,
AnnotationChange,
MailboxName,
SubscriptionChange,
MailboxMetadataChange,
ServerMetadataChange,
Other(String),
}Expand description
An event type that can be requested in a NOTIFY command (RFC 5465 Section 5, RFC 5423 Section 4).
RFC 5465 Section 8 ABNF:
event = message-event / mailbox-event / user-event / event-ext
message-event = ("MessageNew" [SP "(" fetch-att *(SP fetch-att) ")"])
/ "MessageExpunge" / "FlagChange" / "AnnotationChange"
mailbox-event = "MailboxName" / "SubscriptionChange" / "MailboxMetadataChange"
user-event = "ServerMetadataChange"Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MessageNew
MessageNew — new message delivered or appended
(RFC 5465 Section 5.2, RFC 5423 Section 4.1).
For the selected mailbox: server sends EXISTS then FETCH with the requested attributes. For other mailboxes: server sends STATUS with UIDNEXT and MESSAGES.
The optional fetch attributes are only valid with selected or
selected-delayed mailbox filters (RFC 5465 Section 5.2).
Fields
MessageExpunge
MessageExpunge — message expunged or expired
(RFC 5465 Section 5.3, RFC 5423 Section 4.1).
MUST always be specified together with MessageNew (RFC 5465 Section 5.2).
FlagChange
FlagChange — message flags changed
(RFC 5465 Section 5.1, RFC 5423 Section 4.2).
Requires both MessageNew and MessageExpunge to also be specified
(RFC 5465 Section 5.1).
AnnotationChange
AnnotationChange — per-message annotation changed
(RFC 5465 Section 5.1).
Requires both MessageNew and MessageExpunge to also be specified
(RFC 5465 Section 5.1).
MailboxName
MailboxName — mailbox created, deleted, or renamed
(RFC 5465 Section 5.4, RFC 5423 Section 4.4).
Server sends unsolicited LIST responses. On rename, the LIST includes
an OLDNAME extended data item.
SubscriptionChange
SubscriptionChange — mailbox subscribed or unsubscribed
(RFC 5465 Section 5.5, RFC 5423 Section 4.4).
Server sends unsolicited LIST response with accurate \Subscribed
attribute presence.
MailboxMetadataChange
MailboxMetadataChange — per-mailbox metadata annotation changed
(RFC 5465 Section 5.6).
Server sends unsolicited METADATA response per RFC 5464 Section 4.4.2. Optional unless the server implements METADATA (RFC 5464).
ServerMetadataChange
ServerMetadataChange — server-level metadata annotation changed
(RFC 5465 Section 5.7).
Server sends unsolicited METADATA response with empty mailbox name. Optional unless the server implements METADATA or METADATA-SERVER.
Other(String)
Unrecognized event type — preserved verbatim for forward compatibility
(RFC 5465 Section 8: event-ext = atom).
Trait Implementations§
Source§impl Clone for NotifyEvent
impl Clone for NotifyEvent
Source§fn clone(&self) -> NotifyEvent
fn clone(&self) -> NotifyEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more