hUI/hui/src/state.rs

12 lines
331 B
Rust
Raw Normal View History

2024-02-17 14:43:46 -06:00
use hashbrown::{HashMap, HashSet};
use nohash_hasher::BuildNoHashHasher;
use std::any::Any;
2024-02-18 10:22:31 -06:00
//TODO impl StateRepo functions and automatic cleanup of inactive ids
2024-02-17 14:43:46 -06:00
#[derive(Default)]
pub struct StateRepo {
state: HashMap<u64, Box<dyn Any>, BuildNoHashHasher<u64>>,
active_ids: HashSet<u64, BuildNoHashHasher<u64>>
}