pub struct Evidence {
pub id: EvidenceId,
pub evidence_type: EvidenceType,
pub hypothesis_id: HypothesisId,
pub strength: f64,
pub metadata: EvidenceMetadata,
pub created_at: DateTime<Utc>,
}Expand description
Evidence attached to a hypothesis
Fields§
§id: EvidenceId§evidence_type: EvidenceType§hypothesis_id: HypothesisId§strength: f64§metadata: EvidenceMetadata§created_at: DateTime<Utc>Implementations§
Source§impl Evidence
impl Evidence
pub fn new( hypothesis_id: HypothesisId, evidence_type: EvidenceType, strength: f64, metadata: EvidenceMetadata, ) -> Self
pub fn id(&self) -> EvidenceId
pub fn hypothesis_id(&self) -> HypothesisId
pub fn strength(&self) -> f64
pub fn evidence_type(&self) -> EvidenceType
pub fn created_at(&self) -> DateTime<Utc>
Sourcepub fn is_supporting(&self) -> bool
pub fn is_supporting(&self) -> bool
Check if evidence is supporting (positive strength)
Sourcepub fn is_refuting(&self) -> bool
pub fn is_refuting(&self) -> bool
Check if evidence is refuting (negative strength)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Evidence
impl<'de> Deserialize<'de> for Evidence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Evidence
impl RefUnwindSafe for Evidence
impl Send for Evidence
impl Sync for Evidence
impl Unpin for Evidence
impl UnsafeUnpin for Evidence
impl UnwindSafe for Evidence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more