pub struct Event { /* private fields */ }Expand description
Event type emitted by an Awareness struct.
Implementations§
Source§impl Event
impl Event
pub fn new( added: Vec<ClientID>, updated: Vec<ClientID>, removed: Vec<ClientID>, ) -> Self
pub fn summary(&self) -> &AwarenessUpdateSummary
Sourcepub fn added(&self) -> &[ClientID]
pub fn added(&self) -> &[ClientID]
Collection of new clients that have been added to an Awareness struct, that was not known
before. Actual client state can be accessed via awareness.clients().get(client_id).
Sourcepub fn updated(&self) -> &[ClientID]
pub fn updated(&self) -> &[ClientID]
Collection of new clients that have been updated within an Awareness struct since the last
update. Actual client state can be accessed via awareness.clients().get(client_id).
Sourcepub fn removed(&self) -> &[ClientID]
pub fn removed(&self) -> &[ClientID]
Collection of new clients that have been removed from Awareness struct since the last update.
Sourcepub fn all_changes(&self) -> Vec<ClientID>
pub fn all_changes(&self) -> Vec<ClientID>
Returns all the changed client IDs (added, updated and removed) combined.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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