INNER CODE UNIT · Rust
new
zly2006/zhihu-plus-plus · aigc-vote-server/src/lib.rs:354
fn new(credit_bypass_voters: HashSet<String>) -> Self {
Self {
data: Mutex::new(MemoryData::default()),
credit_bypass_voters: normalize_identity_tokens(credit_bypass_voters),
}
}
}
#[derive(Default)]
struct MemoryData {
clients: HashMap<String, ClientRecord>,
read_events: HashSet<ReadEventKey>,
snapshots: HashSet<SnapshotKey>,
flags: HashMap<FlagKey, MemoryFlagRecord>,
}
#[derive(Debug)]
struct ClientRecord {