Hooks and last works

This commit is contained in:
Natsu Kagami 2020-06-12 02:44:56 -04:00
parent f8cbd7ceb0
commit c43f9067b8
Signed by: nki
GPG key ID: 73376E117CD20735
5 changed files with 135 additions and 34 deletions

View file

@ -118,6 +118,17 @@ impl fmt::Display for Mode {
}
}
impl Mode {
/// Convert to oppai mode.
pub fn to_oppai_mode(self) -> Option<oppai_rs::Mode> {
Some(match self {
Mode::Std => oppai_rs::Mode::Std,
Mode::Taiko => oppai_rs::Mode::Taiko,
_ => return None,
})
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Beatmap {
// Beatmapset info