pub struct ContentIndex { /* private fields */ }Expand description
Per-root overlay: relative path → unique sorted trigrams.
Implementations§
Source§impl ContentIndex
impl ContentIndex
pub fn new() -> Self
pub fn clear(&mut self)
pub fn is_complete(&self) -> bool
pub fn mark_complete(&mut self)
pub fn indexed_len(&self) -> usize
pub fn skipped_len(&self) -> usize
Sourcepub fn upsert(&mut self, root: &Path, rel: &str, size: u64)
pub fn upsert(&mut self, root: &Path, rel: &str, size: u64)
Re-read rel under root and replace its posting.
pub fn remove(&mut self, rel: &str)
Sourcepub fn remove_tree(&mut self, rel: &str)
pub fn remove_tree(&mut self, rel: &str)
Drop rel and every descendant (rel/…).
Trait Implementations§
Source§impl Debug for ContentIndex
impl Debug for ContentIndex
Auto Trait Implementations§
impl Freeze for ContentIndex
impl RefUnwindSafe for ContentIndex
impl Send for ContentIndex
impl Sync for ContentIndex
impl Unpin for ContentIndex
impl UnsafeUnpin for ContentIndex
impl UnwindSafe for ContentIndex
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> 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