pub struct Supervisor { /* private fields */ }
Expand description
Supervisor manages a pool of games and client waiting for games
Implementations§
Source§impl Supervisor
impl Supervisor
Sourcepub fn add_client(&mut self, client: Client<TcpStream>)
pub fn add_client(&mut self, client: Client<TcpStream>)
Add a new client socket to playlist
Sourcepub fn client_index_by_id(&mut self, client_id: String) -> Option<usize>
pub fn client_index_by_id(&mut self, client_id: String) -> Option<usize>
Gets a client index by identifier (peer address for now) if any
Sourcepub fn update_playlist(&mut self)
pub fn update_playlist(&mut self)
Update clients in playlist to see if they join a game or disconnect
Sourcepub fn update_games(&mut self)
pub fn update_games(&mut self)
Update game handles to see if they are still running
Sourcepub fn update_remote(&mut self, remote: &mut Remote) -> RemoteUpdateStatus
pub fn update_remote(&mut self, remote: &mut Remote) -> RemoteUpdateStatus
Update game handles to see if they are still running Returns true if a request was processed
Auto Trait Implementations§
impl Freeze for Supervisor
impl !RefUnwindSafe for Supervisor
impl Send for Supervisor
impl !Sync for Supervisor
impl Unpin for Supervisor
impl !UnwindSafe for Supervisor
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