pub struct Awareness { /* private fields */ }
Implementations§
Source§impl Awareness
impl Awareness
pub fn new(local_id: u64) -> Self
pub fn on_update( &mut self, f: impl Fn(&Awareness, AwarenessEvent) + Send + Sync + 'static, )
pub fn get_states(&self) -> &AwarenessStates
pub fn get_local_state(&self) -> Option<String>
pub fn set_local_state(&mut self, content: String)
pub fn clear_local_state(&mut self)
pub fn apply_update(&mut self, update: AwarenessStates)
Auto Trait Implementations§
impl Freeze for Awareness
impl !RefUnwindSafe for Awareness
impl Send for Awareness
impl Sync for Awareness
impl Unpin for Awareness
impl !UnwindSafe for Awareness
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