pub trait NetworkGraphView {
// Required methods
fn nodes(&self) -> BoxStream<'static, PeerId>;
fn find_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
destination: &'life1 PeerId,
length: usize,
) -> Pin<Box<dyn Future<Output = Vec<DestinationRouting>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A trait specifying the graph traversal functionality
Required Methods§
Sourcefn nodes(&self) -> BoxStream<'static, PeerId>
fn nodes(&self) -> BoxStream<'static, PeerId>
Returns a stream of all known nodes in the network graph.
Sourcefn find_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
destination: &'life1 PeerId,
length: usize,
) -> Pin<Box<dyn Future<Output = Vec<DestinationRouting>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
destination: &'life1 PeerId,
length: usize,
) -> Pin<Box<dyn Future<Output = Vec<DestinationRouting>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a list of all routes to the given destination of the specified length.