pub struct Conf<T> {
pub contents: T,
pub confidence: u8,
}
Expand description
Compatible with the BNType*WithConfidence
types
Fields§
§contents: T
§confidence: u8
Implementations§
Trait Implementations§
source§impl<T> ConfMergeable<T, Conf<T>> for Conf<T>
impl<T> ConfMergeable<T, Conf<T>> for Conf<T>
Returns best value or LHS on tie
Conf<T>
+ Conf<T>
→ Conf<T>
source§impl<T> ConfMergeable<T, Conf<T>> for Option<Conf<T>>
impl<T> ConfMergeable<T, Conf<T>> for Option<Conf<T>>
Returns RHS if LHS is None
Option<Conf<T>>
+ Conf<T>
→ Conf<T>
source§impl<T> ConfMergeable<T, Option<Conf<T>>> for Conf<T>
impl<T> ConfMergeable<T, Option<Conf<T>>> for Conf<T>
Returns LHS if RHS is None
Conf<T>
+ Option<Conf<T>>
→ Conf<T>
source§impl From<BNBoolWithConfidence> for Conf<bool>
impl From<BNBoolWithConfidence> for Conf<bool>
source§fn from(bool_with_confidence: BNBoolWithConfidence) -> Self
fn from(bool_with_confidence: BNBoolWithConfidence) -> Self
Converts to this type from the input type.
source§impl From<BNOffsetWithConfidence> for Conf<i64>
impl From<BNOffsetWithConfidence> for Conf<i64>
source§fn from(offset_with_confidence: BNOffsetWithConfidence) -> Self
fn from(offset_with_confidence: BNOffsetWithConfidence) -> Self
Converts to this type from the input type.
impl<T: Copy> Copy for Conf<T>
impl<T: Eq> Eq for Conf<T>
Auto Trait Implementations§
impl<T> Freeze for Conf<T>where
T: Freeze,
impl<T> RefUnwindSafe for Conf<T>where
T: RefUnwindSafe,
impl<T> Send for Conf<T>where
T: Send,
impl<T> Sync for Conf<T>where
T: Sync,
impl<T> Unpin for Conf<T>where
T: Unpin,
impl<T> UnwindSafe for Conf<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