pub struct ContentIndex { /* private fields */ }
Expand description
Content index for fast search and retrieval
Implementations§
Source§impl ContentIndex
impl ContentIndex
Sourcepub fn add_node(&self, node: ContentNode) -> Result<()>
pub fn add_node(&self, node: ContentNode) -> Result<()>
Add a content node to the index
Sourcepub fn remove_node(&self, file_path: &Path) -> Result<()>
pub fn remove_node(&self, file_path: &Path) -> Result<()>
Remove a content node from the index
Sourcepub fn get_node(&self, file_path: &Path) -> Option<ContentNode>
pub fn get_node(&self, file_path: &Path) -> Option<ContentNode>
Get a content node by file path
Sourcepub fn get_chunk(&self, chunk_id: &ChunkId) -> Option<ContentChunk>
pub fn get_chunk(&self, chunk_id: &ChunkId) -> Option<ContentChunk>
Get a content chunk by ID
Sourcepub fn search(&self, query: &SearchQuery) -> Result<Vec<SearchResult>>
pub fn search(&self, query: &SearchQuery) -> Result<Vec<SearchResult>>
Search for content
Sourcepub fn get_stats(&self) -> ContentStats
pub fn get_stats(&self) -> ContentStats
Get content statistics
Sourcepub fn add_update_listener(&self, listener: Box<dyn ContentUpdateListener>)
pub fn add_update_listener(&self, listener: Box<dyn ContentUpdateListener>)
Add content update listener
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContentIndex
impl !RefUnwindSafe for ContentIndex
impl Send for ContentIndex
impl Sync for ContentIndex
impl Unpin 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