pub struct SyncedServerState(Mutex<ServerState>);Tuple Fields§
§0: Mutex<ServerState>Implementations§
Source§impl SyncedServerState
impl SyncedServerState
pub fn try_lock(&self) -> Result<MutexGuard<'_, ServerState>, TryLockError>
Sourcepub async fn lock(&self) -> MutexGuard<'_, ServerState>
pub async fn lock(&self) -> MutexGuard<'_, ServerState>
NOTE: Trying to lock SyncedServerState while holding a LockedLobbyState
may cause a deadlock, because certain processes iterate over and lock all lobby states
in the server state, meaning these processes hold a server lock until they have gotten
all lobby locks at least once. If you hold a lobby lock while waiting for a server lock,
and such a process is holding the server lock, a deadlock will occur.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SyncedServerState
impl !RefUnwindSafe for SyncedServerState
impl Send for SyncedServerState
impl Sync for SyncedServerState
impl Unpin for SyncedServerState
impl !UnwindSafe for SyncedServerState
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