pub struct DuplicateAnalysis {
pub duplicate_id: String,
pub winner: ScoredAsset,
pub losers: Vec<ScoredAsset>,
pub conflicts: Vec<MetadataConflict>,
pub needs_review: bool,
}Expand description
Analysis result for a duplicate group.
Contains the selected winner, losers, detected conflicts, and whether manual review is recommended.
Fields§
§duplicate_id: StringDuplicate group identifier
winner: ScoredAssetThe asset selected as the winner (highest metadata score)
losers: Vec<ScoredAsset>Assets that should be deleted (lower metadata scores)
conflicts: Vec<MetadataConflict>Detected metadata conflicts
needs_review: boolWhether manual review is recommended due to conflicts
Implementations§
Source§impl DuplicateAnalysis
impl DuplicateAnalysis
Sourcepub fn from_group(group: &DuplicateGroup) -> Self
pub fn from_group(group: &DuplicateGroup) -> Self
Analyze a duplicate group and select a winner.
The winner is selected based on:
- Largest dimensions (width × height pixels) - best quality
- Largest file size (tiebreaker)
- First in list (stable sort, final tiebreaker)
Metadata scores are still calculated and stored for consolidation decisions.
§Arguments
group- The duplicate group to analyze
§Returns
Analysis result with winner, losers, and conflict information
Trait Implementations§
Source§impl Clone for DuplicateAnalysis
impl Clone for DuplicateAnalysis
Source§fn clone(&self) -> DuplicateAnalysis
fn clone(&self) -> DuplicateAnalysis
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DuplicateAnalysis
impl Debug for DuplicateAnalysis
Source§impl<'de> Deserialize<'de> for DuplicateAnalysis
impl<'de> Deserialize<'de> for DuplicateAnalysis
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 DuplicateAnalysis
impl RefUnwindSafe for DuplicateAnalysis
impl Send for DuplicateAnalysis
impl Sync for DuplicateAnalysis
impl Unpin for DuplicateAnalysis
impl UnsafeUnpin for DuplicateAnalysis
impl UnwindSafe for DuplicateAnalysis
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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