[][src]Trait libp2prs_core::routing::Routing

pub trait Routing: Send {
#[must_use]    pub fn find_peer<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        peer_id: &'life1 PeerId
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Multiaddr>, TransportError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
pub fn box_clone(&self) -> IRouting; }

routing trait for finding a peer.

Required methods

#[must_use]pub fn find_peer<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    peer_id: &'life1 PeerId
) -> Pin<Box<dyn Future<Output = Result<Vec<Multiaddr>, TransportError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Retrieves the addresses of a remote peer.

Any types supporting this trait can be used to search network for the addresses, f.g., Kad-DHT.

pub fn box_clone(&self) -> IRouting[src]

Loading content...

Implementors

Loading content...