pub struct GameStats {
pub score: u32,
pub best_score: u32,
pub moves: u32,
pub duration: u64,
pub won: bool,
pub game_over: bool,
}
Expand description
Game statistics
Fields§
§score: u32
Current score
best_score: u32
Best score achieved
moves: u32
Number of moves made
duration: u64
Game duration in seconds
won: bool
Whether the game is won
game_over: bool
Whether the game is over
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GameStats
impl<'de> Deserialize<'de> for GameStats
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 GameStats
impl RefUnwindSafe for GameStats
impl Send for GameStats
impl Sync for GameStats
impl Unpin for GameStats
impl UnwindSafe for GameStats
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