Skip to main content

RoutingStrategy

Trait RoutingStrategy 

Source
pub trait RoutingStrategy: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn decide(
        &self,
        env: &DropEnvelope,
        peer: PeerId,
        local: PeerId,
        now: u64,
        store: &Store,
        mode: NodeMode,
        peer_relay: RelayCapacity,
        remaining_copies: u32,
    ) -> Result<RouteDecision>;
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn decide( &self, env: &DropEnvelope, peer: PeerId, local: PeerId, now: u64, store: &Store, mode: NodeMode, peer_relay: RelayCapacity, remaining_copies: u32, ) -> Result<RouteDecision>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§