pub struct Score(/* private fields */);Expand description
A confidence score, validated to the closed unit interval [0, 1].
Validation happens at the trust boundary: construction and deserialization both
reject NaN, infinities, and out-of-range values, so nothing downstream has to
re-check. Serializes transparently as an f64.
Implementations§
Source§impl Score
impl Score
Trait Implementations§
impl Copy for Score
Source§impl<'de> Deserialize<'de> for Score
impl<'de> Deserialize<'de> for Score
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for Score
impl PartialOrd for Score
impl StructuralPartialEq for Score
Auto Trait Implementations§
impl Freeze for Score
impl RefUnwindSafe for Score
impl Send for Score
impl Sync for Score
impl Unpin for Score
impl UnsafeUnpin for Score
impl UnwindSafe for Score
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