Struct rosu_pp::model::beatmap::BeatmapAttributesBuilder
source · pub struct BeatmapAttributesBuilder { /* private fields */ }
Expand description
A builder for BeatmapAttributes
and HitWindows
.
Implementations§
source§impl BeatmapAttributesBuilder
impl BeatmapAttributesBuilder
sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new BeatmapAttributesBuilder
.
The mode will be GameMode::Osu
and attributes are set to 5.0
.
sourcepub const fn map(self, map: &Beatmap) -> Self
pub const fn map(self, map: &Beatmap) -> Self
Use the given Beatmap
’s attributes, mode, and convert status.
sourcepub const fn ar(self, ar: f32, with_mods: bool) -> Self
pub const fn ar(self, ar: f32, with_mods: bool) -> Self
Specify the approach rate.
with_mods
determines if the given value should be used before
or after accounting for mods, e.g. on true
the value will be
used as is and on false
it will be modified based on the mods.
sourcepub const fn od(self, od: f32, with_mods: bool) -> Self
pub const fn od(self, od: f32, with_mods: bool) -> Self
Specify the overall difficulty.
with_mods
determines if the given value should be used before
or after accounting for mods, e.g. on true
the value will be
used as is and on false
it will be modified based on the mods.
sourcepub const fn cs(self, cs: f32, with_mods: bool) -> Self
pub const fn cs(self, cs: f32, with_mods: bool) -> Self
Specify the circle size.
with_mods
determines if the given value should be used before
or after accounting for mods, e.g. on true
the value will be
used as is and on false
it will be modified based on the mods.
sourcepub const fn hp(self, hp: f32, with_mods: bool) -> Self
pub const fn hp(self, hp: f32, with_mods: bool) -> Self
Specify the drain rate.
with_mods
determines if the given value should be used before
or after accounting for mods, e.g. on true
the value will be
used as is and on false
it will be modified based on the mods.
sourcepub const fn clock_rate(self, clock_rate: f64) -> Self
pub const fn clock_rate(self, clock_rate: f64) -> Self
Specify a custom clock rate.
sourcepub const fn mode(self, mode: GameMode, is_convert: bool) -> Self
pub const fn mode(self, mode: GameMode, is_convert: bool) -> Self
Specify a GameMode
and whether it’s a converted map.
sourcepub fn difficulty(self, difficulty: &Difficulty) -> Self
pub fn difficulty(self, difficulty: &Difficulty) -> Self
Specify all settings through Difficulty
.
sourcepub fn hit_windows(&self) -> HitWindows
pub fn hit_windows(&self) -> HitWindows
Calculate the AR and OD hit windows.
sourcepub fn build(&self) -> BeatmapAttributes
pub fn build(&self) -> BeatmapAttributes
Calculate the BeatmapAttributes
.
Trait Implementations§
source§impl Clone for BeatmapAttributesBuilder
impl Clone for BeatmapAttributesBuilder
source§fn clone(&self) -> BeatmapAttributesBuilder
fn clone(&self) -> BeatmapAttributesBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BeatmapAttributesBuilder
impl Debug for BeatmapAttributesBuilder
source§impl Default for BeatmapAttributesBuilder
impl Default for BeatmapAttributesBuilder
source§impl From<&Beatmap> for BeatmapAttributesBuilder
impl From<&Beatmap> for BeatmapAttributesBuilder
source§impl<M> From<&Converted<'_, M>> for BeatmapAttributesBuilder
impl<M> From<&Converted<'_, M>> for BeatmapAttributesBuilder
source§impl PartialEq for BeatmapAttributesBuilder
impl PartialEq for BeatmapAttributesBuilder
source§fn eq(&self, other: &BeatmapAttributesBuilder) -> bool
fn eq(&self, other: &BeatmapAttributesBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.