mirror of
https://github.com/griffi-gh/kubi.git
synced 2025-01-05 09:58:21 -06:00
19 lines
420 B
Rust
19 lines
420 B
Rust
use shipyard::{Component, EntityId};
|
|
use hashbrown::HashMap;
|
|
use nohash_hasher::BuildNoHashHasher;
|
|
|
|
#[derive(Component)]
|
|
pub struct Client(ClientId);
|
|
|
|
pub struct ClientMap(HashMap<ClientId, EntityId, BuildNoHashHasher<ClientIdRepr>>);
|
|
impl ClientMap {
|
|
pub fn new() -> Self {
|
|
Self(HashMap::with_hasher(BuildNoHashHasher::default()))
|
|
}
|
|
}
|
|
impl Default for ClientMap {
|
|
fn default() -> Self {
|
|
Self::new()
|
|
}
|
|
}
|