pub enum CloneClass {
Type1,
Type2,
Type3,
RestrictedSemantic,
}Expand description
How closely a clone group’s members match.
Variants§
Type1
Verbatim copy (formatting and comments aside).
Type2
Copy with consistent renames and/or changed literals.
Type3
Similar but not identical: a gapped clone, with inserted, deleted or modified statements.
RestrictedSemantic
A correspondence justified only by one or more registered semantic rules, never by a general equivalence claim.
Implementations§
Source§impl CloneClass
impl CloneClass
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Stable lowercase identifier used in reports and storage.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Read back a classification written by Self::name.
None for anything else, including a name a newer release writes:
guessing which class an unknown one resembles would put a finding in a
category the tool that recorded it did not choose.
Sourcepub const fn is_exact(self) -> bool
pub const fn is_exact(self) -> bool
Whether the class asserts equality rather than resemblance.
Type-1 and Type-2 both mean the copies agree statement for statement, verbatim or up to renaming. Type-3 and restricted semantic findings are explainable correspondences, not claims of textual equality.
Trait Implementations§
Source§impl Clone for CloneClass
impl Clone for CloneClass
Source§fn clone(&self) -> CloneClass
fn clone(&self) -> CloneClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CloneClass
Source§impl Debug for CloneClass
impl Debug for CloneClass
impl Eq for CloneClass
Source§impl Ord for CloneClass
impl Ord for CloneClass
Source§fn cmp(&self, other: &CloneClass) -> Ordering
fn cmp(&self, other: &CloneClass) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CloneClass
impl PartialEq for CloneClass
Source§impl PartialOrd for CloneClass
impl PartialOrd for CloneClass
impl StructuralPartialEq for CloneClass
Auto Trait Implementations§
impl Freeze for CloneClass
impl RefUnwindSafe for CloneClass
impl Send for CloneClass
impl Sync for CloneClass
impl Unpin for CloneClass
impl UnsafeUnpin for CloneClass
impl UnwindSafe for CloneClass
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.