pub struct NetworkDedupEngine { /* private fields */ }Expand description
Engine for detecting duplicates across distributed media nodes.
Add manifests from each remote node then call [find_cross_node_duplicates]
to get a list of CrossNodeGroups.
Implementations§
Source§impl NetworkDedupEngine
impl NetworkDedupEngine
Sourcepub fn new(config: NetworkDedupConfig) -> Self
pub fn new(config: NetworkDedupConfig) -> Self
Create a new engine with the given configuration.
Sourcepub fn add_manifest(&mut self, manifest: NodeManifest)
pub fn add_manifest(&mut self, manifest: NodeManifest)
Add a NodeManifest to the engine.
Sourcepub fn manifest_count(&self) -> usize
pub fn manifest_count(&self) -> usize
Return the number of manifests registered.
Sourcepub fn total_records(&self) -> usize
pub fn total_records(&self) -> usize
Return the total number of file records across all manifests.
Sourcepub fn find_cross_node_duplicates(&self) -> Vec<CrossNodeGroup>
pub fn find_cross_node_duplicates(&self) -> Vec<CrossNodeGroup>
Find duplicate groups across all registered node manifests.
The algorithm runs two passes:
- Exact pass – groups records by Blake3 hex digest. Only groups that span at least two different nodes are returned.
- Perceptual pass – for records with pHash and not already grouped as exact duplicates, applies Hamming-distance comparison with the configured threshold and duration guard.
Sourcepub fn cross_node_summary(&self) -> CrossNodeSummary
pub fn cross_node_summary(&self) -> CrossNodeSummary
Return a summary of how many duplicates span how many nodes.
Trait Implementations§
Source§impl Debug for NetworkDedupEngine
impl Debug for NetworkDedupEngine
Auto Trait Implementations§
impl Freeze for NetworkDedupEngine
impl RefUnwindSafe for NetworkDedupEngine
impl Send for NetworkDedupEngine
impl Sync for NetworkDedupEngine
impl Unpin for NetworkDedupEngine
impl UnsafeUnpin for NetworkDedupEngine
impl UnwindSafe for NetworkDedupEngine
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