Struct rosu_pp::any::ConvertedDifficulty
source · pub struct ConvertedDifficulty<'a, M> { /* private fields */ }
Expand description
Difficulty calculator on maps of a given mode.
§Example
use rosu_pp::{Beatmap, Difficulty};
use rosu_pp::catch::{Catch, CatchDifficultyAttributes};
let converted = Beatmap::from_path("./resources/2118524.osu")
.unwrap()
.unchecked_into_converted();
let attrs: CatchDifficultyAttributes = Difficulty::new()
.mods(8 + 1024) // HDFL
.with_mode::<Catch>() // -> `ConvertedDifficulty`
.calculate(&converted);
Implementations§
source§impl<'a, M> ConvertedDifficulty<'a, M>
impl<'a, M> ConvertedDifficulty<'a, M>
sourcepub const fn inner(self) -> &'a Difficulty
pub const fn inner(self) -> &'a Difficulty
Return the internal Difficulty
.
sourcepub const fn cast<N: IGameMode>(self) -> ConvertedDifficulty<'a, N>
pub const fn cast<N: IGameMode>(self) -> ConvertedDifficulty<'a, N>
Cast from generic mode M
to N
.
source§impl<M: IGameMode> ConvertedDifficulty<'_, M>
impl<M: IGameMode> ConvertedDifficulty<'_, M>
sourcepub fn calculate(self, map: &Converted<'_, M>) -> M::DifficultyAttributes
pub fn calculate(self, map: &Converted<'_, M>) -> M::DifficultyAttributes
Perform the difficulty calculation for a Converted
beatmap and
process the final skill values.
sourcepub fn strains(self, map: &Converted<'_, M>) -> M::Strains
pub fn strains(self, map: &Converted<'_, M>) -> M::Strains
Perform a difficulty calculation for a Converted
beatmap without
processing the final skill values.
sourcepub fn gradual_difficulty(self, map: &Converted<'_, M>) -> M::GradualDifficulty
pub fn gradual_difficulty(self, map: &Converted<'_, M>) -> M::GradualDifficulty
Create a gradual difficulty calculator for a Converted
beatmap.
sourcepub fn gradual_performance(
self,
map: &Converted<'_, M>
) -> M::GradualPerformance
pub fn gradual_performance( self, map: &Converted<'_, M> ) -> M::GradualPerformance
Create a gradual performance calculator for a Converted
beatmap.
Trait Implementations§
source§impl<M> AsRef<Difficulty> for ConvertedDifficulty<'_, M>
impl<M> AsRef<Difficulty> for ConvertedDifficulty<'_, M>
source§fn as_ref(&self) -> &Difficulty
fn as_ref(&self) -> &Difficulty
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<M> Clone for ConvertedDifficulty<'_, M>
impl<M> Clone for ConvertedDifficulty<'_, M>
source§impl<M> Debug for ConvertedDifficulty<'_, M>
impl<M> Debug for ConvertedDifficulty<'_, M>
source§impl<'a, M: IGameMode> From<&'a Difficulty> for ConvertedDifficulty<'a, M>
impl<'a, M: IGameMode> From<&'a Difficulty> for ConvertedDifficulty<'a, M>
source§fn from(difficulty: &'a Difficulty) -> Self
fn from(difficulty: &'a Difficulty) -> Self
Converts to this type from the input type.
source§impl<M> PartialEq for ConvertedDifficulty<'_, M>
impl<M> PartialEq for ConvertedDifficulty<'_, M>
impl<M> Copy for ConvertedDifficulty<'_, M>
Auto Trait Implementations§
impl<'a, M> Freeze for ConvertedDifficulty<'a, M>
impl<'a, M> RefUnwindSafe for ConvertedDifficulty<'a, M>where
M: RefUnwindSafe,
impl<'a, M> Send for ConvertedDifficulty<'a, M>where
M: Send,
impl<'a, M> Sync for ConvertedDifficulty<'a, M>where
M: Sync,
impl<'a, M> Unpin for ConvertedDifficulty<'a, M>where
M: Unpin,
impl<'a, M> UnwindSafe for ConvertedDifficulty<'a, M>where
M: UnwindSafe,
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