Trait safe_network::routing::PeerUtils [−][src]
pub trait PeerUtils {
fn new(name: XorName, addr: SocketAddr) -> Self;
fn set_reachable(&mut self, reachable: bool);
fn name(&self) -> &XorName;
fn addr(&self) -> &SocketAddr;
fn age(&self) -> u8;
fn is_reachable(&self) -> bool;
}
Expand description
Required methods
fn new(name: XorName, addr: SocketAddr) -> Self
fn new(name: XorName, addr: SocketAddr) -> Self
Creates a new Peer
given Name
, SocketAddr
.
fn set_reachable(&mut self, reachable: bool)
fn set_reachable(&mut self, reachable: bool)
Set the reachable flag.
fn addr(&self) -> &SocketAddr
fn addr(&self) -> &SocketAddr
Returns the SocketAddr
.
fn is_reachable(&self) -> bool
fn is_reachable(&self) -> bool
Returns the reachable flag.