pub struct CloneRegions { /* private fields */ }Expand description
The graded regions of one audit run.
Implementations§
Source§impl CloneRegions
impl CloneRegions
Sourcepub fn regions(&self) -> &[CloneRegion]
pub fn regions(&self) -> &[CloneRegion]
The graded regions.
Sourcepub fn introduced_count(&self) -> usize
pub fn introduced_count(&self) -> usize
Number of regions that fail the gate.
Sourcepub fn inherited_count(&self) -> usize
pub fn inherited_count(&self) -> usize
Number of regions that do not fail the gate.
Sourcepub fn demoted_count(&self) -> usize
pub fn demoted_count(&self) -> usize
Number of regions whose member groups the change did not write.
Sourcepub fn group_regions(&self) -> &[usize]
pub fn group_regions(&self) -> &[usize]
Region index of each head group, in output order.
Sourcepub fn group_introduced(&self, index: usize) -> bool
pub fn group_introduced(&self, index: usize) -> bool
Whether the head group at index adds duplication that no
ignoredClones entry accepts. Its region then fails the gate. An old
group that overlaps a new group stays not introduced.
Sourcepub fn group_demoted(&self, index: usize) -> bool
pub fn group_demoted(&self, index: usize) -> bool
Whether the change wrote no line of the head group at index,
although its key is new (issue #2164).
Sourcepub fn annotate_payload(&self, payload: &mut DupesReportPayload)
pub fn annotate_payload(&self, payload: &mut DupesReportPayload)
Set the region index of each clone group and the clone_regions
list of a typed duplication payload whose groups are the graded head
groups, in the same order.
Sourcepub fn annotate_json(&self, json: &mut Value)
pub fn annotate_json(&self, json: &mut Value)
Insert the region index of each clone group and the clone_regions
list into serialized duplication JSON whose clone_groups are the
graded head groups, in the same order.
Sourcepub fn findings(&self) -> Vec<CloneRegionFinding>
pub fn findings(&self) -> Vec<CloneRegionFinding>
The wire form of the regions.
Trait Implementations§
Source§impl Clone for CloneRegions
impl Clone for CloneRegions
Source§impl Debug for CloneRegions
impl Debug for CloneRegions
Source§impl Default for CloneRegions
impl Default for CloneRegions
impl Eq for CloneRegions
Source§impl PartialEq for CloneRegions
impl PartialEq for CloneRegions
impl StructuralPartialEq for CloneRegions
Auto Trait Implementations§
impl Forget for CloneRegions
impl Freeze for CloneRegions
impl Move for CloneRegions
impl RefUnwindSafe for CloneRegions
impl Send for CloneRegions
impl Sync for CloneRegions
impl Unpin for CloneRegions
impl UnsafeUnpin for CloneRegions
impl UnwindSafe for CloneRegions
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,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more