pub trait PeerDiscoveryBase {
    // Required methods
    fn start<'async_trait>(
        self: Arc<Self>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn stop<'async_trait>(
        self: Arc<Self>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn run<'async_trait>(
        self: Arc<Self>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn wait<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn notify(&self);
    fn session(&self) -> OutboundSessionPtr;
    fn p2p(&self) -> P2pPtr;
}
Expand description

Defines a common interface for multiple peer discovery processes.

NOTE: Currently only one Peer Discovery implementation exists. Making Peer Discovery generic enables us to support network swarming, since the peer discovery process will differ depending on whether it occurs on the overlay network or a subnet.

Required Methods§

source

fn start<'async_trait>( self: Arc<Self> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn stop<'async_trait>( self: Arc<Self> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn run<'async_trait>( self: Arc<Self> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn wait<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn notify(&self)

source

fn session(&self) -> OutboundSessionPtr

source

fn p2p(&self) -> P2pPtr

Implementors§