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§
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".