pub async fn list_peers(&mut self) -> HashSet<PeerId> {
        let (sender, receiver) = oneshot::channel();
        self.sender
            .send(Command::ListPeers {
                peer_id: self.local_peer_id,
                sender,
            })
            .await
            .expect("Command receiver not to be dropped.");
        receiver.await.expect("Sender not to be dropped.")
    }
/// List the peers that this node is connected to.
List the peers that this node is connected to.
List the peers that this node is connected to .
pub async fn list_peers(&mut self) -> HashSet<PeerId> {
        let (sender, receiver) = oneshot::channel();
        self.sender
            .send(Command::ListPeers {
                peer_id: self.local_peer_id,
                sender,
            })
            .await
            .expect("Command receiver not to be dropped.");
        receiver.await.expect("Sender not to be dropped.")
    }
pub async fn list_peers ( & mut self ) -> HashSet < PeerId > { let ( sender , receiver ) = oneshot :: channel ( ) ; self . sender . send ( Command :: ListPeers { peer_id : self . local_peer_id , sender , } ) . await . expect ( " " ) ; receiver . await . expect ( " " ) }
List the peers that this node is connected to.
List the peers that this node is connected to .
&mut self
&mut self