pub struct StructuralRegion {
pub fingerprint: CloneGroupFingerprint,
pub clone_type: CloneClass,
pub statements: u32,
pub occurrences: Vec<RegionOccurrence>,
}Expand description
A duplicated run of statements and every place it occurs.
Unlike a GroupDetail, whose members are only similar, every
occurrence here holds the same content under the group’s classification:
the same tokens for CloneClass::Type1, the same tokens up to consistent
renaming for CloneClass::Type2. The enclosing units need not be clones
of each other — that is the point of reporting runs separately.
Fields§
§fingerprint: CloneGroupFingerprintThe run’s stable, position-free clone-group fingerprint.
clone_type: CloneClassHow the occurrences match: verbatim or up to renaming.
statements: u32Length of the run, in statements.
occurrences: Vec<RegionOccurrence>Where the run occurs, at least twice, in ascending source order.
Trait Implementations§
Source§impl Clone for StructuralRegion
impl Clone for StructuralRegion
Source§fn clone(&self) -> StructuralRegion
fn clone(&self) -> StructuralRegion
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 Debug for StructuralRegion
impl Debug for StructuralRegion
impl Eq for StructuralRegion
Source§impl PartialEq for StructuralRegion
impl PartialEq for StructuralRegion
impl StructuralPartialEq for StructuralRegion
Auto Trait Implementations§
impl Freeze for StructuralRegion
impl RefUnwindSafe for StructuralRegion
impl Send for StructuralRegion
impl Sync for StructuralRegion
impl Unpin for StructuralRegion
impl UnsafeUnpin for StructuralRegion
impl UnwindSafe for StructuralRegion
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<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
Compare self to
key and return true if they are equal.