voxelize/world/
clients.rs

1use actix::Recipient;
2use hashbrown::HashMap;
3
4use specs::Entity;
5
6use crate::EncodedMessage;
7
8/// A client of the server.
9#[derive(Clone, Debug)]
10pub struct Client {
11    /// The client's ID on the voxelize server.
12    pub id: String,
13
14    /// The username of the client.
15    pub username: String,
16
17    /// The entity that represents this client in the ECS world.
18    pub entity: Entity,
19
20    /// Address to the client
21    pub addr: Recipient<EncodedMessage>,
22}
23
24pub type Clients = HashMap<String, Client>;