pub(super) struct SleepStatus {
active_players: i32,
sleeping_players: i32,
}Fields§
§active_players: i32§sleeping_players: i32Implementations§
Source§impl SleepStatus
impl SleepStatus
pub(super) fn are_enough_sleeping(self, sleep_percentage_needed: i32) -> bool
pub(super) fn sleepers_needed(self, sleep_percentage_needed: i32) -> i32
pub(super) const fn remove_all_sleepers(&mut self)
pub(super) const fn amount_sleeping(self) -> i32
pub(super) fn add_player(&mut self, player: &Player)
pub(super) const fn update(&mut self, updated: Self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SleepStatus
impl RefUnwindSafe for SleepStatus
impl Send for SleepStatus
impl Sync for SleepStatus
impl Unpin for SleepStatus
impl UnsafeUnpin for SleepStatus
impl UnwindSafe for SleepStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>