pub struct Library {
pub root: PathBuf,
pub entries: Vec<Entry>,
}Expand description
In-memory catalog of a library directory.
Fields§
§root: PathBuf§entries: Vec<Entry>Implementations§
Source§impl Library
impl Library
Sourcepub fn scan(root: &Path) -> Result<Self>
pub fn scan(root: &Path) -> Result<Self>
Scan a directory for .hmc containers and read their manifests.
Sourcepub fn exact_duplicates(&self) -> Vec<(String, Vec<PathBuf>)>
pub fn exact_duplicates(&self) -> Vec<(String, Vec<PathBuf>)>
Exact duplicates by document identity (BLAKE3). Returns groups with >1 member: (doc_id, paths).
Sourcepub fn document_centroid(&self, entry: &Entry) -> Option<Vec<f32>>
pub fn document_centroid(&self, entry: &Entry) -> Option<Vec<f32>>
Document-level centroid embedding (mean of chunk vectors), for near-dup detection and novelty scoring.
Sourcepub fn near_duplicates(&self, threshold: f32) -> Vec<(String, String, f32)>
pub fn near_duplicates(&self, threshold: f32) -> Vec<(String, String, f32)>
Near-duplicate document pairs above threshold cosine on their
centroids (catches versions/reprints byte-hashing misses).
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl UnwindSafe for Library
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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