You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
488 B
Rust
24 lines
488 B
Rust
use std::sync::Mutex;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SessionState {
|
|
pub emp_uid: Option<i64>,
|
|
pub win_uid: Option<i64>,
|
|
pub queue_token: Option<String>,
|
|
}
|
|
|
|
pub struct AppState {
|
|
pub session: Mutex<SessionState>,
|
|
}
|
|
|
|
impl Default for AppState {
|
|
fn default() -> Self {
|
|
Self {
|
|
session: Mutex::new(SessionState::default()),
|
|
}
|
|
}
|
|
}
|