pub fn new_peer(&mut self, valid_until: Instant) -> PeerId {
        let id = self.new_unique_peer_id();
        let old = self.ledger.insert(id, Peer::new(valid_until));
        // There should not be any preexisting entry with this id
        debug_assert!(old.is_none());
        id
    }
/// Creates a new empty peer with no locks.
///
/// # Return
///
/// The id identifying the new peer. Used as a key in this datastructure to access and
/// manipulate its state.
Creates a new empty peer with no locks.
Creates a new empty peer with no locks .
pub fn new_peer(&mut self, valid_until: Instant) -> PeerId {
        let id = self.new_unique_peer_id();
        let old = self.ledger.insert(id, Peer::new(valid_until));
        // There should not be any preexisting entry with this id
        debug_assert!(old.is_none());
        id
    }
pub fn new_peer ( & mut self , valid_until : Instant ) -> PeerId { let id = self . new_unique_peer_id ( ) ; let old = self . ledger . insert ( id , Peer :: new ( valid_until ) ) ; // There should not be any preexisting entry with this id debug_assert ! ( old is_none ( ) ) ; id }
Creates a new empty peer with no locks.
Creates a new empty peer with no locks .
&mut self
valid_until
Instant
The id identifying the new peer. Used as a key in this datastructure to access and
manipulate its state.
The id identifying the new peer . Used as a key in this datastructure to access and manipulate its state .
&mut self
valid_until
Instant