pub fn new_peer_at(&mut self, id: PeerId, valid_until: Instant) {
        let old = self.ledger.insert(id, Peer::new(valid_until));
        // There should not be any preexisting entry with this id
        assert!(old.is_none());
    }
/// Creates a new peer with an existing peer id.
///
/// This is useful, to restore revenants (i.e. Peers for which we receive a heartbeat after we
/// removed them, due to expiration). This way we can restore them without having to change the
/// peer id on the client side.
///
/// It's the responsibility of the caller to ensure this method is not called with an already
/// existing peer id.
Creates a new peer with an existing peer id.
This is useful, to restore revenants . This way we can restore them without having to change the
peer id on the client side.

It's the responsibility of the caller to ensure this method is not called with an already
existing peer id.
Creates a new peer with an existing peer id . This is useful to restore revenants . This way we can restore them without having to change the peer id on the client side . It ' s the responsibility of the caller to ensure this method is not called with an already existing peer id .
pub fn new_peer_at(&mut self, id: PeerId, valid_until: Instant) {
        let old = self.ledger.insert(id, Peer::new(valid_until));
        // There should not be any preexisting entry with this id
        assert!(old.is_none());
    }
pub fn new_peer_at ( & mut self , id : PeerId , valid_until : Instant ) { let old = self . ledger . insert ( id , Peer :: new ( valid_until ) ) ; // There should not be any preexisting entry with this id assert ! ( old is_none ( ) ) ; }
Creates a new peer with an existing peer id.
Creates a new peer with an existing peer id .
&mut self
id
PeerId
valid_until
Instant
&mut self
id
PeerId
valid_until
Instant