pub struct RoomMut<'s, E: Copy + Eq + Hash + Send + Sync> { /* private fields */ }Implementations§
Source§impl<'s, E: Copy + Eq + Hash + Send + Sync> RoomMut<'s, E>
impl<'s, E: Copy + Eq + Hash + Send + Sync> RoomMut<'s, E>
pub fn new(server: &'s mut Server<E>, key: &RoomKey) -> Self
pub fn key(&self) -> RoomKey
pub fn destroy(&mut self)
pub fn has_user(&self, user_key: &UserKey) -> bool
pub fn add_user(&mut self, user_key: &UserKey) -> &mut Self
pub fn remove_user(&mut self, user_key: &UserKey) -> &mut Self
pub fn users_count(&self) -> usize
Sourcepub fn user_keys(&self) -> impl Iterator<Item = &UserKey>
pub fn user_keys(&self) -> impl Iterator<Item = &UserKey>
Returns an iterator of the UserKey for Users that belong in the [Room]
pub fn has_entity(&self, entity: &E) -> bool
pub fn add_entity(&mut self, entity: &E) -> &mut Self
pub fn remove_entity(&mut self, entity: &E) -> &mut Self
pub fn entities_count(&self) -> usize
pub fn broadcast_message<C: Channel, M: Message>(&mut self, message: &M)
Auto Trait Implementations§
impl<'s, E> Freeze for RoomMut<'s, E>
impl<'s, E> !RefUnwindSafe for RoomMut<'s, E>
impl<'s, E> Send for RoomMut<'s, E>
impl<'s, E> Sync for RoomMut<'s, E>
impl<'s, E> Unpin for RoomMut<'s, E>
impl<'s, E> !UnwindSafe for RoomMut<'s, E>
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