Skip to main content

PathSource

Trait PathSource 

Source
pub trait PathSource {
    // Required methods
    fn find_like(&self, query: &str) -> Option<Vec<PathEntry>>;
    fn all_files(&self) -> Option<Vec<PathEntry>>;
}
Expand description

Source of indexed file paths (e.g., from a database index).

Required Methods§

Source

fn find_like(&self, query: &str) -> Option<Vec<PathEntry>>

Return paths matching query using a fast prefix/substring filter. Returns None if the source cannot answer this query (caller falls back to all_files).

Source

fn all_files(&self) -> Option<Vec<PathEntry>>

Return all known file/directory entries. Returns None if the source is unavailable; caller falls back to a filesystem walk.

Implementors§