pub struct Peer { /* private fields */ }Expand description
Information about a peer
Implementations§
Source§impl Peer
impl Peer
Sourcepub fn new(address: String) -> Peer
pub fn new(address: String) -> Peer
Creates a new peer with the specified address and age 0
§Arguments
address- Network address of peer
Sourcepub fn increment_age(&mut self)
pub fn increment_age(&mut self)
Increments the age of peer by one
Trait Implementations§
impl Eq for Peer
Auto Trait Implementations§
impl Freeze for Peer
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more