pub struct RoomManager {
pub rooms: BTreeMap<BareJid, Room>,
}
Fields§
§rooms: BTreeMap<BareJid, Room>
Implementations§
Source§impl RoomManager
impl RoomManager
pub fn get(&self, room: &BareJid) -> Option<Room>
Sourcepub fn get_nick(&self, room: &BareJid) -> Option<RoomNick>
pub fn get_nick(&self, room: &BareJid) -> Option<RoomNick>
Gets the user’s nickname in a specific room. Panic if not joined/joining
Sourcepub fn get_nick_unchecked(&self, room: &BareJid) -> RoomNick
pub fn get_nick_unchecked(&self, room: &BareJid) -> RoomNick
Unchecked variant of RoomManager::get_nick
Sourcepub fn set_room_joining(&mut self, room: &BareJid, requested_nick: &RoomNick)
pub fn set_room_joining(&mut self, room: &BareJid, requested_nick: &RoomNick)
Sets a room to joining
Sourcepub fn set_room_joined(&mut self, room: &BareJid, nick: &RoomNick)
pub fn set_room_joined(&mut self, room: &BareJid, nick: &RoomNick)
Sets a room to joined, panics if it’s not joining/joined
Sourcepub fn set_room_leaving(&mut self, room: &BareJid)
pub fn set_room_leaving(&mut self, room: &BareJid)
Sets a room to leaving, panics if it’s already left, or unknown
pub fn set_room_left(&mut self, room: &BareJid)
Sourcepub fn is_joining(&self, room: &BareJid) -> bool
pub fn is_joining(&self, room: &BareJid) -> bool
Checks whether the room is already joining
Sourcepub fn is_leaving(&self, room: &BareJid) -> bool
pub fn is_leaving(&self, room: &BareJid) -> bool
Checks whether the room is already leaving
Sourcepub fn rooms_joined<'a>(&'a self) -> Vec<&'a Room>
pub fn rooms_joined<'a>(&'a self) -> Vec<&'a Room>
Lists currently joined rooms
Trait Implementations§
Source§impl Clone for RoomManager
impl Clone for RoomManager
Source§fn clone(&self) -> RoomManager
fn clone(&self) -> RoomManager
Returns a copy of the value. Read more
1.0.0 · 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 RoomManager
impl Debug for RoomManager
Source§impl Default for RoomManager
impl Default for RoomManager
Source§fn default() -> RoomManager
fn default() -> RoomManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RoomManager
impl RefUnwindSafe for RoomManager
impl Send for RoomManager
impl Sync for RoomManager
impl Unpin for RoomManager
impl UnwindSafe for RoomManager
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