pub struct Clients {
client_map: HashMap<String, Client>,
}
Expand description
Container for managing connected clients and their keys
Fields§
§client_map: HashMap<String, Client>
Implementations§
source§impl Clients
impl Clients
sourcepub fn add(&mut self, client_id: String, client: Client)
pub fn add(&mut self, client_id: String, client: Client)
Add a newly connected client to the collection of connections. Index the client by public key.
pub fn client_is_connected(&self, client_id: &String) -> bool
pub fn bump_last_seen(&mut self, client_id: &String) -> Result<(), ()>
Auto Trait Implementations§
impl Freeze for Clients
impl RefUnwindSafe for Clients
impl Send for Clients
impl Sync for Clients
impl Unpin for Clients
impl UnwindSafe for Clients
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more