Trait datafusion_rustyline::completion::Completer [−][src]
pub trait Completer { fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec<String>)>; fn update(&self, line: &mut LineBuffer, start: usize, elected: &str) { ... } }
To be called for tab-completion.
Required Methods
fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec<String>)>
Takes the currently edited line
with the cursor pos
ition and
returns the start position and the completion candidates for the
partial word to be completed.
("ls /usr/loc", 11) => Ok((3, vec!["/usr/local/"]))
Provided Methods
fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)
Updates the edited line
with the elected
candidate.
Implementations on Foreign Types
impl Completer for ()
[src]
impl Completer for ()
impl<'c, C: ?Sized + Completer> Completer for &'c C
[src]
impl<'c, C: ?Sized + Completer> Completer for &'c C
impl<C: ?Sized + Completer> Completer for Box<C>
[src]
impl<C: ?Sized + Completer> Completer for Box<C>
impl<C: ?Sized + Completer> Completer for Rc<C>
[src]
impl<C: ?Sized + Completer> Completer for Rc<C>
impl<C: ?Sized + Completer> Completer for Arc<C>
[src]
impl<C: ?Sized + Completer> Completer for Arc<C>
Implementors
impl Completer for FilenameCompleter