Struct Event
pub struct Event { /* private fields */ }Expand description
Event type emitted by an Awareness struct.
Implementations§
§impl Event
impl Event
pub fn new(added: Vec<u64>, updated: Vec<u64>, removed: Vec<u64>) -> Event
pub fn summary(&self) -> &AwarenessUpdateSummary
pub fn added(&self) -> &[u64]
pub fn added(&self) -> &[u64]
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).
pub fn updated(&self) -> &[u64]
pub fn updated(&self) -> &[u64]
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).
pub fn removed(&self) -> &[u64]
pub fn removed(&self) -> &[u64]
Collection of new clients that have been removed from Awareness struct since the last update.
pub fn all_changes(&self) -> Vec<u64>
pub fn all_changes(&self) -> Vec<u64>
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more