Struct FilenameCompleter
pub struct FilenameCompleter { /* private fields */ }
A Completer for file and folder names.
Implementations
impl FilenameCompleter
fn new() -> SelfConstructor
fn complete_path(&self, line: &str, pos: usize) -> Result<(usize, Vec<Pair>)>Takes the currently edited
linewith the cursorposition and returns the start position and the completion candidates for the partial path to be completed.Errors
Will return
Errif candidates cannot be retrievedfn complete_path_unsorted(&self, line: &str, pos: usize) -> Result<(usize, Vec<Pair>)>Similar to
Self::complete_path, but the returned paths are unsorted.Errors
Will return
Errif candidates cannot be retrieved
Trait Implementations
impl Completer for FilenameCompleter
type Candidate = Pair;fn complete(&self, line: &str, pos: usize, _ctx: &Context<'_>) -> Result<(usize, Vec<Pair>)>
impl Default for FilenameCompleter
fn default() -> Self