pub struct BaselineEntry {
pub kind: BaselineKind,
pub fingerprint: String,
pub members: usize,
pub names: Vec<String>,
}Expand description
One duplicate group as the baseline recorded it.
members is part of the identity, not decoration. An exact group is keyed
by the fingerprint its members share, so a third copy of an already-recorded
function does not change the fingerprint. Without the count, adding that
copy would be inherited duplication; with it, the group has grown past what
was recorded and is reported.
names is decoration, and deliberately so: a baseline nobody can read is a
baseline nobody audits. Nothing matches on it.
Fields§
§kind: BaselineKindWhich set of groups this was recorded from.
fingerprint: StringThe group’s fingerprint, as hex.
members: usizeHow many members the group had when it was recorded.
names: Vec<String>What those members were called, for a reader.
Implementations§
Source§impl BaselineEntry
impl BaselineEntry
Sourcepub fn of(kind: BaselineKind, group: &DuplicateGroup) -> Self
pub fn of(kind: BaselineKind, group: &DuplicateGroup) -> Self
Record group as inherited duplication of kind.
Sourcepub fn admits(&self, kind: BaselineKind, group: &DuplicateGroup) -> bool
pub fn admits(&self, kind: BaselineKind, group: &DuplicateGroup) -> bool
Whether this entry accounts for group in full.
A group that has grown since it was recorded is not accounted for, so the new copy is reported rather than inherited.
Trait Implementations§
Source§impl Clone for BaselineEntry
impl Clone for BaselineEntry
Source§impl Debug for BaselineEntry
impl Debug for BaselineEntry
Source§impl<'de> Deserialize<'de> for BaselineEntry
impl<'de> Deserialize<'de> for BaselineEntry
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 BaselineEntry
Source§impl PartialEq for BaselineEntry
impl PartialEq for BaselineEntry
Source§impl Serialize for BaselineEntry
impl Serialize for BaselineEntry
impl StructuralPartialEq for BaselineEntry
Auto Trait Implementations§
impl Freeze for BaselineEntry
impl RefUnwindSafe for BaselineEntry
impl Send for BaselineEntry
impl Sync for BaselineEntry
impl Unpin for BaselineEntry
impl UnsafeUnpin for BaselineEntry
impl UnwindSafe for BaselineEntry
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
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§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.