use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; use tokio::sync::RwLock; pub struct WebSession { pub slug: String, pub role: String, pub expires_at: Instant, } pub type SessionStore = Arc>>; pub fn new_store() -> SessionStore { Arc::new(RwLock::new(HashMap::new())) }