pub struct GameResult { /* private fields */ }Expand description
Represents a result (win, loss, or draw) over an opposing player or team.
Note well that only the opponent is stored in a GameResult.
The player that actually won, lost or drew respectively is not stored
in the game result, but instead is passed in to new_rating.
Implementations§
Source§impl GameResult
impl GameResult
Sourcepub fn win<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult
pub fn win<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult
Constructs a new game result representing a win over a player or team
with rating opponent_rating.
A Glicko2Rating or GlickoRating can be supplied for opponent_rating,
and it will not affect the result of rating calculations
as the volatility of opponents are not looked at for updating ratings.
Sourcepub fn loss<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult
pub fn loss<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult
Constructs a new game result representing a loss to a player or team
with rating opponent_rating.
A Glicko2Rating or GlickoRating can be supplied for opponent_rating,
and it will not affect the result of rating calculations
as the volatility of opponents are not looked at for updating ratings.
Sourcepub fn draw<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult
pub fn draw<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult
Constructs a new game result representing a draw with a player or team
with rating opponent_rating.
A Glicko2Rating or GlickoRating can be supplied for opponent_rating,
and it will not affect the result of rating calculations
as the volatility of opponents are not looked at for updating ratings.
Trait Implementations§
Source§impl Clone for GameResult
impl Clone for GameResult
Source§fn clone(&self) -> GameResult
fn clone(&self) -> GameResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more