Trait xstack_kad::RoutingAlogrithm

source ·
pub trait RoutingAlogrithm {
    // Required method
    fn route(
        &self,
        peer_id: &PeerId,
    ) -> impl Future<Output = Result<Routing>> + Send + 'static;
}
Expand description

A recursive routing algorithm must implement this trait.

Required Methods§

source

fn route( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<Routing>> + Send + 'static

Create a future to execute the routing algorithm.

  • peer_id, The peer’s id on that the routing algorithm executes.

Object Safety§

This trait is not object safe.

Implementors§