pub trait RateMetric: Send + Sync {
// Required method
fn remaining_ratio(&self) -> f64;
}Expand description
Exposes remaining capacity for quota-aware strategies. Higher is better.
Complementary to LoadMetric (which exposes current load — lower is better):
LoadMetric: “how busy is this node?” → lower winsRateMetric: “how much capacity remains?” → higher wins
A node can implement both — a node may have low load but little remaining quota, or high load but ample quota.
Required Methods§
Sourcefn remaining_ratio(&self) -> f64
fn remaining_ratio(&self) -> f64
Remaining capacity as a ratio: 0.0 = exhausted, 1.0 = fully available.