Pull in code from pool_elo
need to re-integrate yugioh code
This commit is contained in:
37
src/state_enums.rs
Normal file
37
src/state_enums.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub enum LoginState {
|
||||
Authenticated,
|
||||
NotAuthenticated,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub enum ContentState {
|
||||
None,
|
||||
Inventory,
|
||||
Tournaments,
|
||||
}
|
||||
|
||||
impl Display for ContentState {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
match self {
|
||||
ContentState::Inventory => "Inventory",
|
||||
ContentState::Tournaments => "Tournament",
|
||||
ContentState::None => "",
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub enum OpenState {
|
||||
Open,
|
||||
Closed,
|
||||
}
|
||||
Reference in New Issue
Block a user