pub struct DuplicateMatch {Show 13 fields
pub file1: String,
pub file2: String,
pub start_line1: usize,
pub start_line2: usize,
pub end_line1: Option<usize>,
pub end_line2: Option<usize>,
pub length: usize,
pub similarity: f64,
pub hash: u64,
pub clone_type: CloneType,
pub edit_distance: Option<usize>,
pub suppressed_by_directive: Option<bool>,
pub duplicate_id: Option<String>,
/* private fields */
}Expand description
Represents a detected duplicate code fragment
Fields§
§file1: String§file2: String§start_line1: usize§start_line2: usize§end_line1: Option<usize>§end_line2: Option<usize>§length: usize§similarity: f64§hash: u64§clone_type: CloneType§edit_distance: Option<usize>Edit distance (Type-3 only). None for Type-1/2
suppressed_by_directive: Option<bool>Indicates if this duplicate is suppressed by an inline directive
duplicate_id: Option<String>Content-based ID for this duplicate (SHA256 of normalized tokens)
Trait Implementations§
Source§impl Clone for DuplicateMatch
impl Clone for DuplicateMatch
Source§fn clone(&self) -> DuplicateMatch
fn clone(&self) -> DuplicateMatch
Returns a duplicate of the value. Read more
1.0.0 · 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 DuplicateMatch
impl Debug for DuplicateMatch
Source§impl<'de> Deserialize<'de> for DuplicateMatch
impl<'de> Deserialize<'de> for DuplicateMatch
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DuplicateMatch
impl PartialEq for DuplicateMatch
Source§impl Serialize for DuplicateMatch
impl Serialize for DuplicateMatch
impl StructuralPartialEq for DuplicateMatch
Auto Trait Implementations§
impl Freeze for DuplicateMatch
impl RefUnwindSafe for DuplicateMatch
impl Send for DuplicateMatch
impl Sync for DuplicateMatch
impl Unpin for DuplicateMatch
impl UnwindSafe for DuplicateMatch
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> 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