[][src]Struct glicko2::GameResult

pub struct GameResult { /* fields omitted */ }

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.

Methods

impl GameResult[src]

pub fn win<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult[src]

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.

pub fn loss<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult[src]

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.

pub fn draw<T: Into<Glicko2Rating>>(opponent_rating: T) -> GameResult[src]

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

impl Clone for GameResult[src]

impl Copy for GameResult[src]

impl Debug for GameResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.