pub struct ItemFingerprint {
pub parts: Vec<PartDigest>,
}Expand description
What an item contained when a run measured it.
A report carries one per item so a later comparison can ask is this still the
same experiment? An
ItemFingerprint with no parts is “unknown” — it comes from a report
written before fingerprints existed — and a comparison says so rather than
pretending the pairing was checked.
Fields§
§parts: Vec<PartDigest>One digest per part, in ItemPart::ALL order.
Implementations§
Source§impl ItemFingerprint
impl ItemFingerprint
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true when nothing was recorded, so no pairing can be checked.
Sourcepub fn provenance_of(&self, part: ItemPart) -> PartProvenance
pub fn provenance_of(&self, part: ItemPart) -> PartProvenance
Where the corpus said part came from.
PartProvenance::Authored for a part nothing was recorded about, which
is the conservative reading: an authored part that moved breaks a
pairing, so an absent declaration never quietly excuses a difference.
Sourcepub fn differing_parts(&self, other: &Self) -> Vec<ItemPart>
pub fn differing_parts(&self, other: &Self) -> Vec<ItemPart>
The parts both fingerprints recorded and disagree about.
Empty when either side is unknown: nothing can be concluded from a digest that was never taken.
Trait Implementations§
Source§impl Clone for ItemFingerprint
impl Clone for ItemFingerprint
Source§impl Debug for ItemFingerprint
impl Debug for ItemFingerprint
Source§impl Default for ItemFingerprint
impl Default for ItemFingerprint
Source§impl<'de> Deserialize<'de> for ItemFingerprintwhere
ItemFingerprint: Default,
impl<'de> Deserialize<'de> for ItemFingerprintwhere
ItemFingerprint: Default,
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>,
impl Eq for ItemFingerprint
Source§impl PartialEq for ItemFingerprint
impl PartialEq for ItemFingerprint
Source§impl Serialize for ItemFingerprint
impl Serialize for ItemFingerprint
impl StructuralPartialEq for ItemFingerprint
Auto Trait Implementations§
impl Freeze for ItemFingerprint
impl RefUnwindSafe for ItemFingerprint
impl Send for ItemFingerprint
impl Sync for ItemFingerprint
impl Unpin for ItemFingerprint
impl UnsafeUnpin for ItemFingerprint
impl UnwindSafe for ItemFingerprint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.