pub struct LinearSearchIndex { /* private fields */ }Expand description
Linear search fallback for when FST is not available
Implementations§
Trait Implementations§
Source§impl Default for LinearSearchIndex
impl Default for LinearSearchIndex
Source§impl DocumentSearch for LinearSearchIndex
impl DocumentSearch for LinearSearchIndex
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 LinearSearchIndex
impl RefUnwindSafe for LinearSearchIndex
impl Send for LinearSearchIndex
impl Sync for LinearSearchIndex
impl Unpin for LinearSearchIndex
impl UnwindSafe for LinearSearchIndex
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