pub struct FstSearchIndex { /* private fields */ }Available on crate feature
search-index only.Expand description
FST-based search index for high-performance queries
Implementations§
Trait Implementations§
Source§impl Default for FstSearchIndex
impl Default for FstSearchIndex
Source§impl DocumentSearch for FstSearchIndex
impl DocumentSearch for FstSearchIndex
Source§fn build_index(&mut self, document: &EditorDocument) -> Result<()>
fn build_index(&mut self, document: &EditorDocument) -> Result<()>
Build or rebuild the search index for the document
Source§fn update_index(
&mut self,
document: &EditorDocument,
_changes: &[Range],
) -> Result<()>
fn update_index( &mut self, document: &EditorDocument, _changes: &[Range], ) -> Result<()>
Update the search index incrementally after document changes
Source§fn search(
&self,
pattern: &str,
options: &SearchOptions,
) -> Result<Vec<SearchResult<'_>>>
fn search( &self, pattern: &str, options: &SearchOptions, ) -> Result<Vec<SearchResult<'_>>>
Search for a pattern in the document
Source§fn find_replace(
&self,
document: &mut EditorDocument,
pattern: &str,
replacement: &str,
options: &SearchOptions,
) -> Result<Vec<SearchResult<'_>>>
fn find_replace( &self, document: &mut EditorDocument, pattern: &str, replacement: &str, options: &SearchOptions, ) -> Result<Vec<SearchResult<'_>>>
Find and replace text in the document
Source§fn stats(&self) -> SearchStats
fn stats(&self) -> SearchStats
Get search statistics
Source§fn clear_index(&mut self)
fn clear_index(&mut self)
Clear the search index to free memory
Auto Trait Implementations§
impl Freeze for FstSearchIndex
impl RefUnwindSafe for FstSearchIndex
impl Send for FstSearchIndex
impl Sync for FstSearchIndex
impl Unpin for FstSearchIndex
impl UnwindSafe for FstSearchIndex
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