Enum rosu_pp::AnyPP[][src]

pub enum AnyPP<'m> {
    Fruits(FruitsPP<'m>),
    Mania(ManiaPP<'m>),
    Osu(OsuPP<'m>),
    Taiko(TaikoPP<'m>),
}

Calculator for pp on maps of any mode.

Variants

Fruits(FruitsPP<'m>)
Mania(ManiaPP<'m>)
Osu(OsuPP<'m>)
Taiko(TaikoPP<'m>)

Implementations

impl<'m> AnyPP<'m>[src]

pub fn new(map: &'m Beatmap) -> Self[src]

pub fn calculate(self) -> PpResult[src]

pub fn attributes(self, attributes: impl AttributeProvider) -> Self[src]

AttributeProvider is implemented by StarResult and PpResult meaning you can give the result of a
star calculation or the result of a pp calculation. If you already calculated the stars for the current map-mod combination, be sure to put them in here so that they don’t have to be recalculated.

pub fn mods(self, mods: u32) -> Self[src]

Specify mods through their bit values.

See https://github.com/ppy/osu-api/wiki#mods

pub fn passed_objects(self, passed_objects: usize) -> Self[src]

Amount of passed objects for partial plays, e.g. a fail.

pub fn accuracy(self, acc: f32) -> Self[src]

Set the accuracy between 0.0 and 100.0.

For some modes this method depends on previously set values be sure to call this last before calling calculate.

Irrelevant for osu!mania.

pub fn misses(self, misses: usize) -> Self[src]

Specify the amount of misses of a play.

Irrelevant for osu!mania.

pub fn combo(self, combo: usize) -> Self[src]

Specify the max combo of the play.

Irrelevant for osu!mania.

pub fn n300(self, n300: usize) -> Self[src]

Specify the amount of 300s of a play.

Irrelevant for osu!mania.

pub fn n100(self, n100: usize) -> Self[src]

Specify the amount of 100s of a play.

Irrelevant for osu!mania.

pub fn n50(self, n50: usize) -> Self[src]

Specify the amount of 50s of a play.

Irrelevant for osu!mania and osu!taiko.

pub fn n_katu(self, n_katu: usize) -> Self[src]

Specify the amount of katus of a play.

This value is only relevant for osu!ctb for which it represent the amount of tiny droplet misses.

pub fn score(self, score: u32) -> Self[src]

Specify the score of a play.

This value is only relevant for osu!mania.

On NoMod its between 0 and 1,000,000, on Easy between 0 and 500,000, etc.

Auto Trait Implementations

impl<'m> RefUnwindSafe for AnyPP<'m>

impl<'m> Send for AnyPP<'m>

impl<'m> Sync for AnyPP<'m>

impl<'m> Unpin for AnyPP<'m>

impl<'m> UnwindSafe for AnyPP<'m>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.