[][src]Struct oppai_rs::Oppai

pub struct Oppai { /* fields omitted */ }

The main oppai struct, which is a thin wrapper that provides safe API to the linked ezpp_* functions.

Methods

impl Oppai[src]

pub fn new(path_to_map: &Path) -> Result<Oppai>[src]

Creates a new, empty Oppai from a map.

pub fn new_from_content(content: impl Into<CString>) -> Result<Oppai>[src]

Creates a new Oppai from a map's content.

pub fn mods(&mut self, mods: Mods) -> &mut Self[src]

Sets the mods for the play.

pub fn mode(&mut self, mode: Mode) -> Result<&mut Self>[src]

Sets the mode for the play. A play can be mode-set if and only if its original map is Std.

pub fn max_combo(&self) -> u32[src]

Gets the maximum possible combo of a map.

pub fn combo(&mut self, combo: Combo) -> Result<&mut Self>[src]

Sets the combo.

pub fn accuracy(&mut self, accuracy: f32) -> Result<&mut Self>[src]

Sets the accuracy.

pub fn pp(&self) -> f32[src]

PP of the play.

pub fn stars(&self) -> f32[src]

Star difficulty of the play.

pub fn run(&self) -> (f32, f32)[src]

Runs oppai and returns the pp and star difficulty of the play.

Auto Trait Implementations

impl RefUnwindSafe for Oppai

impl Send for Oppai

impl Sync for Oppai

impl Unpin for Oppai

impl UnwindSafe for Oppai

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.