pub struct Metric<T, I, Raw, M, F> { /* private fields */ }Expand description
A scoring operator built via the measure().by() → map01().by() pipeline.
Stores two closures:
measure: Fn(I) -> Raw— maps input to an intermediate raw value.map01: Fn(&Raw, I) -> Witnessed<T, Value01>— maps the raw value back alongside the original input to a validated[0, 1]score.
eval(input) composes the two closures.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, I, Raw, M, F> Freeze for Metric<T, I, Raw, M, F>
impl<T, I, Raw, M, F> RefUnwindSafe for Metric<T, I, Raw, M, F>
impl<T, I, Raw, M, F> Send for Metric<T, I, Raw, M, F>
impl<T, I, Raw, M, F> Sync for Metric<T, I, Raw, M, F>
impl<T, I, Raw, M, F> Unpin for Metric<T, I, Raw, M, F>
impl<T, I, Raw, M, F> UnsafeUnpin for Metric<T, I, Raw, M, F>where
M: UnsafeUnpin,
F: UnsafeUnpin,
impl<T, I, Raw, M, F> UnwindSafe for Metric<T, I, Raw, M, F>
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