async fn to_client(&self, id: PlayerId, event: GameEvent) -> Result<()> {
        self.tx_peers
            .get(&id)
            .ok_or(Error {
                kind: ErrorType::Internal,
                message: "Peer does not exist.".to_string(),
            })?
            .send_async(Event::Game(id, event))
            .await?;

        Ok(())
    }
/// Passes a game event to a specific client by ID.
Passes a game event to a specific client by ID.
Passes a game event to a specific client by ID .
async fn to_client(&self, id: PlayerId, event: GameEvent) -> Result<()> {
        self.tx_peers
            .get(&id)
            .ok_or(Error {
                kind: ErrorType::Internal,
                message: "Peer does not exist.".to_string(),
            })?
            .send_async(Event::Game(id, event))
            .await?;
        Ok(())
    }
async fn to_client ( & self , id : PlayerId , event : GameEvent ) -> Result < ( ) > { self . tx_peers . get ( & id ) . ok_or ( Error { kind : ErrorType :: Internal , message : " " . to_string ( ) , } ) ? . send_async ( Event :: Game ( id , event ) ) . await ? ; Ok ( ( ) ) }
Passes a game event to a specific client by ID.
Passes a game event to a specific client by ID .
&self
id
PlayerId
event
GameEvent
&self
id
PlayerId
event
GameEvent