pub enum TimerVoteState {
Idle,
VoteInProgress {
initiator_id: i64,
voters: Vec<i64>,
votes_needed: u32,
expires_at: DateTime<Utc>,
},
TimerActive {
expires_at: DateTime<Utc>,
target_player_id: i64,
},
Cooldown {
expires_at: DateTime<Utc>,
},
Disabled,
}Expand description
State of the timer vote system.
The timer vote allows players to collectively vote to start a turn timer on the current player. This prevents indefinite stalling.
Variants§
Idle
No vote in progress, button is idle
VoteInProgress
Vote is in progress
Fields
TimerActive
Timer is actively counting down
Fields
Cooldown
Vote failed, in cooldown before another can start
Disabled
Feature disabled (not enough players)
Trait Implementations§
Source§impl Clone for TimerVoteState
impl Clone for TimerVoteState
Source§fn clone(&self) -> TimerVoteState
fn clone(&self) -> TimerVoteState
Returns a duplicate 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 TimerVoteState
impl Debug for TimerVoteState
Source§impl Default for TimerVoteState
impl Default for TimerVoteState
Source§fn default() -> TimerVoteState
fn default() -> TimerVoteState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TimerVoteState
impl<'de> Deserialize<'de> for TimerVoteState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TimerVoteState
impl RefUnwindSafe for TimerVoteState
impl Send for TimerVoteState
impl Sync for TimerVoteState
impl Unpin for TimerVoteState
impl UnwindSafe for TimerVoteState
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