pub struct Game {
pub home_game: bool,
pub opponent: i32,
}Expand description
Represents a single match/game between two teams.
The Game struct stores the home/away status and the opponent’s ID.
§Fields
home_game- A boolean indicating if the team is playing at home (true) or away (false).opponent- The ID of the opponent team.
§Example
let match_game = Game {
home_game: true,
opponent: 5,
};
println!("Home game: {}, Opponent: {}", match_game.home_game, match_game.opponent);Fields§
§home_game: bool§opponent: i32Trait Implementations§
Source§impl<'de> Deserialize<'de> for Game
impl<'de> Deserialize<'de> for Game
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 Eq for Game
impl StructuralPartialEq for Game
Auto Trait Implementations§
impl Freeze for Game
impl RefUnwindSafe for Game
impl Send for Game
impl Sync for Game
impl Unpin for Game
impl UnwindSafe for Game
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