pub trait NetworkGraphView {
// Required methods
fn nodes(&self) -> Pin<Box<dyn Stream<Item = PeerId> + Send>>;
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 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
A trait specifying the graph traversal functionality
Required Methods§
Sourcefn nodes(&self) -> Pin<Box<dyn Stream<Item = PeerId> + Send>>
fn nodes(&self) -> Pin<Box<dyn Stream<Item = PeerId> + Send>>
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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns a list of all routes to the given destination of the specified length.