pub fn add_peer(&self, ep: String) {
        let rcp: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.peers);
        let mut peers: sync::MutexGuard<Vec<String>> = rcp.lock().unwrap();
        if (!peers.contains(&ep)) && ep != self.ep {
            peers.push(ep);
        }
        drop(peers);
    }
/// add a peer to the multi-agent system.
add a peer to the multi-agent system.
add a peer to the multi - agent system .
pub fn add_peer(&self, ep: String) {
        let rcp: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.peers);
        let mut peers: sync::MutexGuard<Vec<String>> = rcp.lock().unwrap();
        if (!peers.contains(&ep)) && ep != self.ep {
            peers.push(ep);
        }
        drop(peers);
    }
pub fn add_peer ( & self , ep : String ) { let rcp : sync :: Arc < sync :: Mutex < Vec < String > > > = sync :: Arc :: clone ( & self . peers ) ; let mut peers : sync :: MutexGuard < Vec < String > > = rcp . lock ( ) . unwrap ( ) ; if ( ! peers . contains ( & ep ) ) && ep != self . ep { peers . push ( ep ) ; } drop ( peers ) ; }
add a peer to the multi-agent system.
add a peer to the multi - agent system .
&self
ep
String
&self
ep
String