pub struct Scanner { /* private fields */ }Expand description
Main scanner for detecting duplicates
Implementations§
Source§impl Scanner
impl Scanner
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new Scanner with default settings
This is now infallible as there are no I/O or allocation failures.
Sourcepub fn with_config(
min_block_size: usize,
similarity_threshold: f64,
) -> Result<Self>
pub fn with_config( min_block_size: usize, similarity_threshold: f64, ) -> Result<Self>
Creates a new Scanner with custom settings
Sourcepub fn with_exclude_patterns(self, patterns: Vec<String>) -> Self
pub fn with_exclude_patterns(self, patterns: Vec<String>) -> Self
Sets custom exclude patterns, replacing the defaults
Sourcepub fn with_type3_detection(self, tolerance: f64) -> Result<Self>
pub fn with_type3_detection(self, tolerance: f64) -> Result<Self>
Enables Type-3 clone detection with the specified tolerance
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnwindSafe for Scanner
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> 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