pub enum NotificationStreamEvent {
Init {
unread_count: u64,
},
Other(Value),
}Expand description
An event on the notification stream.
The server sends {"type":"init", ...} as the first frame and arbitrary
event shapes afterwards. This enum handles the one well-known frame and
preserves everything else as raw JSON so new server-side event types
don’t break older clients.
Variants§
Init
First frame on connect. Contains the user’s unread notification count.
Other(Value)
Any other event kind. The raw JSON is preserved.
Trait Implementations§
Source§impl Clone for NotificationStreamEvent
impl Clone for NotificationStreamEvent
Source§fn clone(&self) -> NotificationStreamEvent
fn clone(&self) -> NotificationStreamEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NotificationStreamEvent
impl RefUnwindSafe for NotificationStreamEvent
impl Send for NotificationStreamEvent
impl Sync for NotificationStreamEvent
impl Unpin for NotificationStreamEvent
impl UnsafeUnpin for NotificationStreamEvent
impl UnwindSafe for NotificationStreamEvent
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