[][src]Trait d9d_p2p::peer::P2P

pub trait P2P {
    fn send_to<M: Send>(&self, to: PubAddr, message: M);
fn send_to_all<M: Send>(&self, message: M);
fn query_peer(&self, query: PubAddr) -> MultiAddr;
fn query_peers(&self) -> Vec<MultiAddr>;
fn query_num_peers(&self) -> usize; }

The P2P trait defines a standard inteface that all P2P implementation must expose.

Required methods

fn send_to<M: Send>(&self, to: PubAddr, message: M)

fn send_to_all<M: Send>(&self, message: M)

fn query_peer(&self, query: PubAddr) -> MultiAddr

fn query_peers(&self) -> Vec<MultiAddr>

fn query_num_peers(&self) -> usize

Loading content...

Implementors

impl<C: Client> P2P for Peer<C>[src]

Loading content...