#[non_exhaustive]pub struct TransportScore {
pub signal: f32,
pub proximity: f32,
pub bandwidth: f32,
pub congestion: f32,
pub energy: f32,
pub reliability: f32,
pub load: f32,
pub total: f32,
}Expand description
Score breakdown for transport selection.
#[non_exhaustive] so a future scoring factor can be added without a
breaking-change bump. External callers that need to construct a value
(benchmarks, tests, tooling) build a TransportScoreFactors literal
and pass it to Self::from_factors — the factors struct uses named
fields so adding a factor in the future does not silently misorder
existing call sites.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.signal: f32Signal strength score (0-100).
proximity: f32Proximity/hop distance score (0-100).
bandwidth: f32Available bandwidth score (0-100).
congestion: f32Congestion score (0-100, higher is less congested).
energy: f32Energy efficiency score (0-100).
reliability: f32Reliability score (0-100).
load: f32Load score (0-100, higher = more capacity available).
total: f32Total weighted score.
Implementations§
Source§impl TransportScore
impl TransportScore
Sourcepub fn from_factors(factors: TransportScoreFactors) -> Self
pub fn from_factors(factors: TransportScoreFactors) -> Self
Constructs a score from explicit per-factor values.
Intended for callers outside this crate (benchmarks, tooling). The
per-factor weighting is the selector’s responsibility; this
constructor performs no validation or recomputation of total.