feat: groundwork for multi-profile support

This commit is contained in:
2025-03-03 02:07:15 +01:00
parent d25841853c
commit 6410ca2721
16 changed files with 744 additions and 184 deletions

View File

@ -2,6 +2,27 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize)]
pub enum Game {
#[serde(rename = "ongeki")]
Ongeki,
#[serde(rename = "chunithm")]
Chunithm,
}
}
impl Game {
pub fn from_str(s: &str) -> Option<Game> {
match s {
"ongeki" => Some(Game::Ongeki),
"chunithm" => Some(Game::Chunithm),
_ => None
}
}
}
impl std::fmt::Display for Game {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Game::Ongeki => write!(f, "ongeki"),
Game::Chunithm => write!(f, "chunithm")
}
}
}