pub struct Score {
Show 19 fields pub accuracy: f32, pub created_at: DateTime<Utc>, pub grade: Grade, pub max_combo: u32, pub map: Option<Beatmap>, pub mapset: Option<BeatmapsetCompact>, pub mode: GameMode, pub mods: GameMods, pub perfect: bool, pub pp: Option<f32>, pub rank_country: Option<u32>, pub rank_global: Option<u32>, pub replay: bool, pub score: u32, pub score_id: u64, pub statistics: ScoreStatistics, pub user: Option<UserCompact>, pub user_id: u32, pub weight: Option<ScoreWeight>,
}

Fields

accuracy: f32created_at: DateTime<Utc>grade: Grademax_combo: u32map: Option<Beatmap>mapset: Option<BeatmapsetCompact>mode: GameModemods: GameModsperfect: boolpp: Option<f32>rank_country: Option<u32>rank_global: Option<u32>replay: boolscore: u32score_id: u64statistics: ScoreStatisticsuser: Option<UserCompact>user_id: u32weight: Option<ScoreWeight>

Implementations

Count all hitobjects of the score i.e. for GameMode::STD the amount 300s, 100s, 50s, and misses.

Note: Includes tiny droplet (misses) for GameMode::CTB

Calculate the accuracy i.e. 0 <= accuracy <= 100

Calculate the grade of the score. Should only be used in case the score was modified and the internal grade field is no longer correct.

The accuracy is only required for GameMode::MNA and GameMode::CTB scores and is calculated internally if not provided.

This method assumes the score to be a pass i.e. the amount of passed objects is equal to the beatmaps total amount of objects. Otherwise, it may produce an incorrect grade.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more