pub fn is_connected(&self, peer: &PeerId) -> bool {
        self.established
            .get(peer)
            .map(|established| !established.connections.is_empty())
            .unwrap_or(false)
    }
// Check if the local peer currently has at least one active connection to the remote.
Check if the local peer currently has at least one active connection to the remote.
Check if the local peer currently has at least one active connection to the remote .
pub fn is_connected(&self, peer: &PeerId) -> bool {
        self.established
            .get(peer)
            .map(|established| !established.connections.is_empty())
            .unwrap_or(false)
    }
pub fn is_connected ( & self , peer : & PeerId ) -> bool { self . established . get ( peer ) . map ( | established | ! established . connections . is_empty ( ) ) . unwrap_or ( false ) }
Check if the local peer currently has at least one active connection to the remote.
Check if the local peer currently has at least one active connection to the remote .
&self
peer
&PeerId
&self
peer
&PeerId