pub struct Observation<K> { /* private fields */ }Expand description
One dependency observation captured by a query frame.
Implementations§
Source§impl<K> Observation<K>
impl<K> Observation<K>
Sourcepub fn new(
key: K,
kind: ObservationKind,
revision: Revision,
fingerprint: Option<ValueFingerprint>,
) -> Self
pub fn new( key: K, kind: ObservationKind, revision: Revision, fingerprint: Option<ValueFingerprint>, ) -> Self
Creates an observation from a key, kind, revision, and optional value fingerprint.
Sourcepub fn read(key: K, revision: Revision, fingerprint: ValueFingerprint) -> Self
pub fn read(key: K, revision: Revision, fingerprint: ValueFingerprint) -> Self
Creates a query-read observation.
Sourcepub fn kind(&self) -> &ObservationKind
pub fn kind(&self) -> &ObservationKind
Returns the observation kind.
Sourcepub fn fingerprint(&self) -> Option<ValueFingerprint>
pub fn fingerprint(&self) -> Option<ValueFingerprint>
Returns the captured value fingerprint when this observation has one.
Trait Implementations§
Source§impl<K: Clone> Clone for Observation<K>
impl<K: Clone> Clone for Observation<K>
Source§fn clone(&self) -> Observation<K>
fn clone(&self) -> Observation<K>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: Debug> Debug for Observation<K>
impl<K: Debug> Debug for Observation<K>
impl<K: Eq> Eq for Observation<K>
Source§impl<K: Hash> Hash for Observation<K>
impl<K: Hash> Hash for Observation<K>
Source§impl<K: PartialEq> PartialEq for Observation<K>
impl<K: PartialEq> PartialEq for Observation<K>
impl<K: PartialEq> StructuralPartialEq for Observation<K>
Auto Trait Implementations§
impl<K> Freeze for Observation<K>where
K: Freeze,
impl<K> RefUnwindSafe for Observation<K>where
K: RefUnwindSafe,
impl<K> Send for Observation<K>where
K: Send,
impl<K> Sync for Observation<K>where
K: Sync,
impl<K> Unpin for Observation<K>where
K: Unpin,
impl<K> UnsafeUnpin for Observation<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for Observation<K>where
K: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FingerprintValue for Twhere
T: Hash,
impl<T> FingerprintValue for Twhere
T: Hash,
Source§fn incremental_fingerprint(&self) -> ValueFingerprint
fn incremental_fingerprint(&self) -> ValueFingerprint
Returns a compact value identity for incremental cutoff.