pub struct CrossFormatDetector { /* private fields */ }Expand description
Detector for cross-format duplicates.
Implementations§
Source§impl CrossFormatDetector
impl CrossFormatDetector
Sourcepub fn new(config: CrossFormatConfig) -> Self
pub fn new(config: CrossFormatConfig) -> Self
Create a new detector.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a detector with default configuration.
Sourcepub fn add(&mut self, info: FormatInfo)
pub fn add(&mut self, info: FormatInfo)
Add a file to the detection pool.
Sourcepub fn add_batch(&mut self, infos: impl IntoIterator<Item = FormatInfo>)
pub fn add_batch(&mut self, infos: impl IntoIterator<Item = FormatInfo>)
Add multiple files.
Sourcepub fn item_count(&self) -> usize
pub fn item_count(&self) -> usize
Number of files in the pool.
Sourcepub fn find_matches(&self) -> Vec<CrossFormatMatch>
pub fn find_matches(&self) -> Vec<CrossFormatMatch>
Find all cross-format duplicate pairs.
Sourcepub fn find_groups(&self) -> Vec<CrossFormatGroup>
pub fn find_groups(&self) -> Vec<CrossFormatGroup>
Find and group cross-format duplicates using transitive closure.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrossFormatDetector
impl RefUnwindSafe for CrossFormatDetector
impl Send for CrossFormatDetector
impl Sync for CrossFormatDetector
impl Unpin for CrossFormatDetector
impl UnsafeUnpin for CrossFormatDetector
impl UnwindSafe for CrossFormatDetector
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