pub enum TypedEvent {
Show 14 variants
Alert(String),
Bye {
code: Option<ResponseCode>,
text: String,
},
NotificationOverflow {
code: Option<String>,
text: String,
},
QueueOverflow {
dropped_count: usize,
since: Instant,
},
Exists(u32),
Recent(u32),
Expunge(u32),
Vanished {
earlier: bool,
uids: Vec<UidRange>,
},
FetchUpdate(Box<FetchResponse>),
MailboxEvent(MailboxInfo),
MetadataChange {},
ServerMetadataChange {},
CapabilityChange(Vec<Capability>),
Extension(Box<UntaggedResponse>),
}Expand description
Asynchronously delivered server data.
Each variant models a distinct class of server notification. The
driver task converts raw UntaggedResponses into TypedEvents
and publishes them via
DriverEventSink.
Variants§
Alert(String)
RFC 3501 §7.1 [ALERT] — informational, never dropped.
Bye
RFC 3501 §7.1.5 BYE — connection ending.
NotificationOverflow
RFC 5465 §5.8 NOTIFICATIONOVERFLOW — NOTIFY registration cleared.
QueueOverflow
Internal overflow marker. Emitted when the event queue drops events.
Exists(u32)
RFC 3501 §7.3.1 EXISTS — mailbox size change.
Recent(u32)
RFC 3501 §7.3.2 RECENT.
Expunge(u32)
RFC 3501 §7.4.1 EXPUNGE — message removed (sequence form).
Vanished
RFC 7162 VANISHED — message removed (UID form).
FetchUpdate(Box<FetchResponse>)
RFC 3501 §7.4.2 FETCH — flags or other update.
MailboxEvent(MailboxInfo)
RFC 5465 §5 MailboxName event.
MetadataChange
RFC 5465 §5 MailboxMetadataChange.
ServerMetadataChange
RFC 5465 §5 ServerMetadataChange.
CapabilityChange(Vec<Capability>)
RFC 3501 §7.2.1 CAPABILITY change.
Extension(Box<UntaggedResponse>)
Extension or future event.
Trait Implementations§
Source§impl Clone for TypedEvent
impl Clone for TypedEvent
Source§fn clone(&self) -> TypedEvent
fn clone(&self) -> TypedEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypedEvent
impl Debug for TypedEvent
Source§impl From<UntaggedResponse> for TypedEvent
impl From<UntaggedResponse> for TypedEvent
Source§fn from(resp: UntaggedResponse) -> Self
fn from(resp: UntaggedResponse) -> Self
Convert a raw untagged response into a typed event.
Used by the driver task when routing unsolicited responses to the
event sink. Handles the well-known response variants directly;
everything else is wrapped in TypedEvent::Extension.