pub struct ServerState {
pub players: DashMap<String, ConnectedPlayer>,
pub rooms: DashMap<String, Room>,
pub server_key: String,
pub max_rooms: usize,
pub official_key: Option<String>,
pub analytics: AnalyticsHandle,
pub deck_play_events: DeckPlayEventHandle,
}Fields§
§players: DashMap<String, ConnectedPlayer>§rooms: DashMap<String, Room>§server_key: String§max_rooms: usize§official_key: Option<String>§analytics: AnalyticsHandle§deck_play_events: DeckPlayEventHandleImplementations§
Source§impl ServerState
impl ServerState
pub fn new( server_key: String, max_rooms: usize, official_key: Option<String>, analytics: AnalyticsHandle, deck_play_events: DeckPlayEventHandle, ) -> Self
pub fn username_taken_by_connected(&self, username: &str) -> bool
pub fn find_disconnected_by_username( &self, username: &str, ) -> Option<(String, Option<String>, u64)>
pub fn find_connected_by_username( &self, username: &str, ) -> Option<(String, u64, bool)>
Auto Trait Implementations§
impl !RefUnwindSafe for ServerState
impl Freeze for ServerState
impl Send for ServerState
impl Sync for ServerState
impl Unpin for ServerState
impl UnsafeUnpin for ServerState
impl UnwindSafe for ServerState
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