pub struct ScoreStatistics {Show 17 fields
pub miss: u32,
pub meh: u32,
pub ok: u32,
pub good: u32,
pub great: u32,
pub perfect: u32,
pub large_tick_hit: u32,
pub large_tick_miss: u32,
pub small_tick_hit: u32,
pub small_tick_miss: u32,
pub ignore_hit: u32,
pub ignore_miss: u32,
pub large_bonus: u32,
pub small_bonus: u32,
pub slider_tail_hit: u32,
pub combo_break: u32,
pub legacy_combo_increase: u32,
}Fields§
§miss: u32§meh: u32§ok: u32§good: u32§great: u32§perfect: u32§large_tick_hit: u32§large_tick_miss: u32§small_tick_hit: u32§small_tick_miss: u32§ignore_hit: u32§ignore_miss: u32§large_bonus: u32§small_bonus: u32§slider_tail_hit: u32§combo_break: u32§legacy_combo_increase: u32Implementations§
Source§impl ScoreStatistics
impl ScoreStatistics
Sourcepub const fn total_hits(&self, mode: GameMode) -> u32
pub const fn total_hits(&self, mode: GameMode) -> u32
Count all hitobjects of the score i.e. for GameMode::Osu the amount 300s, 100s, 50s, and misses.
Note: Includes tiny droplet (misses) for GameMode::Catch.
Sourcepub fn accuracy(&self, mode: GameMode, max_statistics: &ScoreStatistics) -> f32
pub fn accuracy(&self, mode: GameMode, max_statistics: &ScoreStatistics) -> f32
Calculate the accuracy rounded to two decimal points i.e. 0 <= accuracy <= 100
Sourcepub fn legacy_accuracy(&self, mode: GameMode) -> f32
pub fn legacy_accuracy(&self, mode: GameMode) -> f32
Calculate the accuracy rounded to two decimal points i.e. 0 <= accuracy <= 100.
Slider hits and such will not be considered.
Sourcepub const fn as_legacy(&self, mode: GameMode) -> LegacyScoreStatistics
pub const fn as_legacy(&self, mode: GameMode) -> LegacyScoreStatistics
Turn ScoreStatistics into LegacyScoreStatistics
Trait Implementations§
Source§impl Clone for ScoreStatistics
impl Clone for ScoreStatistics
Source§fn clone(&self) -> ScoreStatistics
fn clone(&self) -> ScoreStatistics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScoreStatistics
impl Debug for ScoreStatistics
Source§impl Default for ScoreStatistics
impl Default for ScoreStatistics
Source§fn default() -> ScoreStatistics
fn default() -> ScoreStatistics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ScoreStatistics
impl<'de> Deserialize<'de> for ScoreStatistics
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
Source§impl PartialEq for ScoreStatistics
impl PartialEq for ScoreStatistics
Source§impl Serialize for ScoreStatistics
impl Serialize for ScoreStatistics
impl Eq for ScoreStatistics
impl StructuralPartialEq for ScoreStatistics
Auto Trait Implementations§
impl Freeze for ScoreStatistics
impl RefUnwindSafe for ScoreStatistics
impl Send for ScoreStatistics
impl Sync for ScoreStatistics
impl Unpin for ScoreStatistics
impl UnwindSafe for ScoreStatistics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.