pub fn on_peer_disconnected(&mut self, peer: PeerId) {
        if let Some(established) = self.connections.remove_all_connections(&peer) {
            established
                .connections
                .keys()
                .into_iter()
                .for_each(|conn_id| self.on_connection_closed(peer, conn_id))
        }
    }
// Handle a remote peer disconnecting completely.
// Emit failures for the pending responses on all pending connections.
Handle a remote peer disconnecting completely.
Emit failures for the pending responses on all pending connections.
Handle a remote peer disconnecting completely . Emit failures for the pending responses on all pending connections .
pub fn on_peer_disconnected(&mut self, peer: PeerId) {
        if let Some(established) = self.connections.remove_all_connections(&peer) {
            established
                .connections
                .keys()
                .into_iter()
                .for_each(|conn_id| self.on_connection_closed(peer, conn_id))
        }
    }
pub fn on_peer_disconnected ( & mut self , peer : PeerId ) { if let Some ( established ) = self . connections . remove_all_connections ( & peer ) { established . connections . keys ( ) . into_iter ( ) . for_each ( | conn_id | self . on_connection_closed ( peer , conn_id ) ) } }
Handle a remote peer disconnecting completely.
Handle a remote peer disconnecting completely .
&mut self
peer
PeerId
&mut self
peer
PeerId