pub enum PresenceEvent {
Joined {
key: String,
current: Option<Presence>,
joined: Presence,
},
Left {
key: String,
current: Presence,
left: Presence,
},
Synced,
Disconnected,
ChannelLeft,
ChannelClosed,
ChannelError,
}Expand description
A synchronized Presence change or channel lifecycle event.
Variants§
Joined
A key or one of its metas joined.
Fields
§
joined: PresenceEntry or metas added by this update.
Left
A key or one of its metas left.
Fields
§
current: PresenceEntry before the leave was applied.
§
left: PresenceEntry or metas removed by this update.
Synced
A full state or diff was applied.
Disconnected
The socket disconnected and local Presence state was cleared.
ChannelLeft
The channel was explicitly left and local state was cleared.
ChannelClosed
The server closed the channel and local state was cleared.
ChannelError
The channel errored and local state was cleared.
Trait Implementations§
Source§impl Clone for PresenceEvent
impl Clone for PresenceEvent
Source§fn clone(&self) -> PresenceEvent
fn clone(&self) -> PresenceEvent
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 PresenceEvent
impl Debug for PresenceEvent
Source§impl PartialEq for PresenceEvent
impl PartialEq for PresenceEvent
Source§fn eq(&self, other: &PresenceEvent) -> bool
fn eq(&self, other: &PresenceEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PresenceEvent
Auto Trait Implementations§
impl Freeze for PresenceEvent
impl RefUnwindSafe for PresenceEvent
impl Send for PresenceEvent
impl Sync for PresenceEvent
impl Unpin for PresenceEvent
impl UnsafeUnpin for PresenceEvent
impl UnwindSafe for PresenceEvent
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