pub struct Difficulty {
pub hp_drain_rate: f32,
pub circle_size: f32,
pub overall_difficulty: f32,
pub approach_rate: f32,
pub slider_multiplier: f32,
pub slider_tick_rate: f32,
}Fields§
§hp_drain_rate: f32§circle_size: f32§overall_difficulty: f32§approach_rate: f32§slider_multiplier: f32§slider_tick_rate: f32Implementations§
Source§impl Difficulty
impl Difficulty
pub fn new( hp_drain_rate: f32, circle_size: f32, overall_difficulty: f32, approach_rate: f32, slider_multiplier: f32, slider_tick_rate: f32, ) -> Self
pub fn is_valid(&self) -> bool
pub fn difficulty_rating(&self) -> &'static str
pub fn circle_size_pixels(&self) -> f32
pub fn approach_rate_ms(&self) -> f32
pub fn od_300_window(&self, overall_difficulty: Option<f32>) -> f32
pub fn od_100_window(&self, overall_difficulty: Option<f32>) -> f32
pub fn od_50_window(&self, overall_difficulty: Option<f32>) -> f32
pub fn to_osu_format(&self) -> String
Trait Implementations§
Source§impl Clone for Difficulty
impl Clone for Difficulty
Source§fn clone(&self) -> Difficulty
fn clone(&self) -> Difficulty
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Difficulty
impl Debug for Difficulty
Source§impl Default for Difficulty
impl Default for Difficulty
Source§impl FromStr for Difficulty
impl FromStr for Difficulty
Source§impl PartialEq for Difficulty
impl PartialEq for Difficulty
Source§fn eq(&self, other: &Difficulty) -> bool
fn eq(&self, other: &Difficulty) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Difficulty
Auto Trait Implementations§
impl Freeze for Difficulty
impl RefUnwindSafe for Difficulty
impl Send for Difficulty
impl Sync for Difficulty
impl Unpin for Difficulty
impl UnsafeUnpin for Difficulty
impl UnwindSafe for Difficulty
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