pub struct DuplicateReport {
pub groups: Vec<DuplicateGroup>,
pub total_duplicates: usize,
pub wasted_space: u64,
pub timestamp: i64,
}Expand description
Duplicate detection report.
Fields§
§groups: Vec<DuplicateGroup>Groups of duplicate files
total_duplicates: usizeTotal number of duplicates
wasted_space: u64Total wasted space in bytes
timestamp: i64Report generation timestamp
Implementations§
Source§impl DuplicateReport
impl DuplicateReport
Sourcepub fn add_group(&mut self, group: DuplicateGroup)
pub fn add_group(&mut self, group: DuplicateGroup)
Add a duplicate group.
Sourcepub fn add_groups(&mut self, groups: Vec<DuplicateGroup>)
pub fn add_groups(&mut self, groups: Vec<DuplicateGroup>)
Add multiple groups.
Sourcepub fn sort_by_savings(&mut self)
pub fn sort_by_savings(&mut self)
Sort groups by wasted space (descending).
Sourcepub fn sort_by_similarity(&mut self)
pub fn sort_by_similarity(&mut self)
Sort groups by similarity score (descending).
Sourcepub fn filter_by_similarity(&mut self, threshold: f64)
pub fn filter_by_similarity(&mut self, threshold: f64)
Filter groups by minimum similarity.
Sourcepub fn to_json(&self) -> DedupResult<String>
pub fn to_json(&self) -> DedupResult<String>
Sourcepub fn to_json_file(&self, path: impl AsRef<Path>) -> DedupResult<()>
pub fn to_json_file(&self, path: impl AsRef<Path>) -> DedupResult<()>
Sourcepub fn to_html_file(&self, path: impl AsRef<Path>) -> DedupResult<()>
pub fn to_html_file(&self, path: impl AsRef<Path>) -> DedupResult<()>
Sourcepub fn group_count(&self) -> usize
pub fn group_count(&self) -> usize
Get total number of groups.
Sourcepub fn get_recommendations(&self) -> Vec<Recommendation>
pub fn get_recommendations(&self) -> Vec<Recommendation>
Get recommendations for deduplication.
Trait Implementations§
Source§impl Clone for DuplicateReport
impl Clone for DuplicateReport
Source§fn clone(&self) -> DuplicateReport
fn clone(&self) -> DuplicateReport
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 DuplicateReport
impl Debug for DuplicateReport
Source§impl Default for DuplicateReport
impl Default for DuplicateReport
Source§impl<'de> Deserialize<'de> for DuplicateReport
impl<'de> Deserialize<'de> for DuplicateReport
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
Auto Trait Implementations§
impl Freeze for DuplicateReport
impl RefUnwindSafe for DuplicateReport
impl Send for DuplicateReport
impl Sync for DuplicateReport
impl Unpin for DuplicateReport
impl UnsafeUnpin for DuplicateReport
impl UnwindSafe for DuplicateReport
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