pub enum WatchEvent {
EnvelopeAdded {
mailbox: String,
envelope: Envelope,
},
EnvelopeRemoved {
mailbox: String,
id: String,
},
FlagsAdded {
mailbox: String,
id: String,
flags: BTreeSet<Flag>,
},
FlagsRemoved {
mailbox: String,
id: String,
flags: BTreeSet<Flag>,
},
KeepAlive,
}Expand description
Delta produced by a watch-mailbox stream.
mailbox is the watched mailbox name (always the same value for the
lifetime of a single stream). Flag deltas are split into FlagsAdded
and FlagsRemoved so hook configs can target one side of a toggle
(e.g. “fire when \Seen is added”).
Variants§
EnvelopeAdded
A new message landed in the watched mailbox.
EnvelopeRemoved
An existing message was expunged from the watched mailbox.
FlagsAdded
One or more flags were set on an existing message.
FlagsRemoved
One or more flags were unset on an existing message.
KeepAlive
The transport is still alive but had no changes to report. Useful for callers that want to distinguish “stream healthy” from “stream stalled” without arming their own timer.
Trait Implementations§
Source§impl Clone for WatchEvent
impl Clone for WatchEvent
Source§fn clone(&self) -> WatchEvent
fn clone(&self) -> WatchEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WatchEvent
impl Debug for WatchEvent
Source§impl<'de> Deserialize<'de> for WatchEvent
impl<'de> Deserialize<'de> for WatchEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WatchEvent
impl RefUnwindSafe for WatchEvent
impl Send for WatchEvent
impl Sync for WatchEvent
impl Unpin for WatchEvent
impl UnsafeUnpin for WatchEvent
impl UnwindSafe for WatchEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.