pub struct Breakdown<'a, T: Float> {
pub name: &'a str,
pub score: T,
pub weight: T,
pub contribution: T,
}Expand description
A single metric’s contribution in a score breakdown.
Returned by .breakdown(). Each item
records the metric’s name, its raw [0, 1] score, its normalized weight,
and the resulting weighted contribution (score × weight).
§Fields
| Field | Type | Description |
|---|---|---|
name | &str | Metric’s human-readable name |
score | T | Raw [0, 1] score, before weighting |
weight | T | Normalized weight (> 0, sum of all weights = 1) |
contribution | T | score × weight — what this metric added to the total |
Fields§
§name: &'a strThe metric’s human-readable name.
score: TThe raw [0, 1] score from the metric (before weighting).
weight: TThe normalized weight.
contribution: TThe weighted contribution: score × weight.
Auto Trait Implementations§
impl<'a, T> Freeze for Breakdown<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for Breakdown<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Breakdown<'a, T>where
T: Send,
impl<'a, T> Sync for Breakdown<'a, T>where
T: Sync,
impl<'a, T> Unpin for Breakdown<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for Breakdown<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for Breakdown<'a, T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more