pub struct ValidTime {
pub start: Option<DateTime<Utc>>,
pub end: Option<DateTime<Utc>>,
pub valid_time_confidence: f32,
}Expand description
Valid-time interval — fallible and host-extracted (confidence-tagged). When start/end are None, belief ordering falls back to TransactionTime.
Fields§
§start: Option<DateTime<Utc>>Start of the valid-time window (None = unknown / open-ended).
end: Option<DateTime<Utc>>End of the valid-time window (None = unknown / open-ended).
valid_time_confidence: f32Confidence in the valid-time extraction itself (mirrors Confidence.valid_time_confidence).
Implementations§
Source§impl ValidTime
impl ValidTime
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true iff both start and end are None (unknown valid-time window).
Sourcepub fn is_temporally_incoherent(&self, tx_time: &TransactionTime) -> bool
pub fn is_temporally_incoherent(&self, tx_time: &TransactionTime) -> bool
Returns true iff the interval is temporally incoherent: start > end, or start > tx_time (valid-time boundary must predate or equal the time it was learned).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ValidTime
impl<'de> Deserialize<'de> for ValidTime
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
impl StructuralPartialEq for ValidTime
Auto Trait Implementations§
impl Freeze for ValidTime
impl RefUnwindSafe for ValidTime
impl Send for ValidTime
impl Sync for ValidTime
impl Unpin for ValidTime
impl UnsafeUnpin for ValidTime
impl UnwindSafe for ValidTime
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