Trait sn_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; }

Required methods

fn new(name: XorName, addr: SocketAddr) -> Self[src]

Creates a new Peer given Name, SocketAddr.

fn set_reachable(&mut self, reachable: bool)[src]

Set the reachable flag.

fn name(&self) -> &XorName[src]

Returns the XorName of the peer.

fn addr(&self) -> &SocketAddr[src]

Returns the SocketAddr.

fn age(&self) -> u8[src]

Returns the age.

fn is_reachable(&self) -> bool[src]

Returns the reachable flag.

Loading content...

Implementations on Foreign Types

impl PeerUtils for Peer[src]

fn new(name: XorName, addr: SocketAddr) -> Self[src]

Creates a new Peer given Name, SocketAddr.

fn set_reachable(&mut self, reachable: bool)[src]

Set the reachable flag.

fn name(&self) -> &XorName[src]

Returns the XorName of the peer.

fn addr(&self) -> &SocketAddr[src]

Returns the SocketAddr.

fn age(&self) -> u8[src]

Returns the age.

fn is_reachable(&self) -> bool[src]

Returns the reachable flag.

Loading content...

Implementors

Loading content...