pub trait WeightCompute: Send + Sync {
type Source;
// Required method
fn compute(&self, stat_kvs: &Self::Source) -> Vec<WeightedItem<Peer>>;
}Expand description
The WeightCompute trait is used to compute the weight array by heartbeats.
Required Associated Types§
Required Methods§
fn compute(&self, stat_kvs: &Self::Source) -> Vec<WeightedItem<Peer>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".