pub struct EditorCloneFingerprintSet { /* private fields */ }Expand description
Report-scoped clone fingerprint assignment for editor-facing duplication output.
Implementations§
Source§impl EditorCloneFingerprintSet
impl EditorCloneFingerprintSet
Sourcepub fn from_groups(groups: &[EditorCloneGroup]) -> Self
pub fn from_groups(groups: &[EditorCloneGroup]) -> Self
Assign collision-free fingerprints for clone groups in one report.
Sourcepub fn fingerprint_for_group(&self, group: &EditorCloneGroup) -> String
pub fn fingerprint_for_group(&self, group: &EditorCloneGroup) -> String
Return the assigned fingerprint for a clone group.
Sourcepub fn fingerprint_for_parts(
&self,
instances: &[EditorCloneInstance],
token_count: usize,
line_count: usize,
) -> String
pub fn fingerprint_for_parts( &self, instances: &[EditorCloneInstance], token_count: usize, line_count: usize, ) -> String
Return the assigned fingerprint for clone-group parts.
Sourcepub fn find_group<'a>(
&self,
groups: &'a [EditorCloneGroup],
fingerprint: &str,
) -> Option<&'a EditorCloneGroup>
pub fn find_group<'a>( &self, groups: &'a [EditorCloneGroup], fingerprint: &str, ) -> Option<&'a EditorCloneGroup>
Find the group addressed by an assigned fingerprint.
Trait Implementations§
Source§impl Clone for EditorCloneFingerprintSet
impl Clone for EditorCloneFingerprintSet
Auto Trait Implementations§
impl Freeze for EditorCloneFingerprintSet
impl RefUnwindSafe for EditorCloneFingerprintSet
impl Send for EditorCloneFingerprintSet
impl Sync for EditorCloneFingerprintSet
impl Unpin for EditorCloneFingerprintSet
impl UnsafeUnpin for EditorCloneFingerprintSet
impl UnwindSafe for EditorCloneFingerprintSet
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<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> ⓘ
Converts
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> ⓘ
Converts
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