pub struct Scored32<C, T: ScoreSetTrait32<C>> { /* private fields */ }Expand description
Implementations§
Source§impl<C, T: ScoreSetTrait32<C>> Scored32<C, T>
impl<C, T: ScoreSetTrait32<C>> Scored32<C, T>
Sourcepub fn new(metrics: T, raw_weights: &[f32]) -> Result<Self, &'static str>
pub fn new(metrics: T, raw_weights: &[f32]) -> Result<Self, &'static str>
Build from a tuple of metrics and raw weights (validated).
Called by the score_set32! macro via $crate::Scored32::new.
Public because #[macro_export] expands in the caller’s crate.
Sourcepub fn breakdown(&self, ctx: &C) -> Vec<Breakdown32>
pub fn breakdown(&self, ctx: &C) -> Vec<Breakdown32>
Produce per-metric breakdown rows.
Auto Trait Implementations§
impl<C, T> Freeze for Scored32<C, T>where
T: Freeze,
impl<C, T> RefUnwindSafe for Scored32<C, T>where
T: RefUnwindSafe,
impl<C, T> Send for Scored32<C, T>where
T: Send,
impl<C, T> Sync for Scored32<C, T>where
T: Sync,
impl<C, T> Unpin for Scored32<C, T>where
T: Unpin,
impl<C, T> UnsafeUnpin for Scored32<C, T>where
T: UnsafeUnpin,
impl<C, T> UnwindSafe for Scored32<C, 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