pub struct Player {
pub username: Option<String>,
pub user_id: Option<u64>,
pub name: String,
pub start_position: String,
pub color: String,
pub score: String,
pub first_time_playing: bool,
pub rating: u64,
pub won: bool,
}Expand description
Details for a player for a game session, as well as information involving that particular game play such as whether or not they won.
Fields§
§username: Option<String>The player’s Boardgamegeek username, if they have one.
user_id: Option<u64>The player’s Boardgamegeek user ID, if they have one.
name: StringThe player’s name.
start_position: StringThe player’s in game start position. Arbitrary user input is allowed so this is a string not a number.
color: StringThe player’s in game color.
score: StringThe player’s in game score.
first_time_playing: boolTrue if this was the first time this player played this game.
rating: u64The player’s rating of the game.
won: boolTrue if this player won the game.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Player
impl<'de> Deserialize<'de> for Player
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
impl StructuralPartialEq for Player
Auto Trait Implementations§
impl Freeze for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnsafeUnpin for Player
impl UnwindSafe for Player
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