pub trait Completer: Send {
fn complete(&mut self, line: &str, pos: usize) -> Vec<Suggestion>;
fn partial_complete(
&mut self,
line: &str,
pos: usize,
start: usize,
offset: usize
) -> Vec<Suggestion> { ... }
fn total_completions(&mut self, line: &str, pos: usize) -> usize { ... }
}
Expand description
A trait that defines how to convert a line and position to a list of potential completions in that position.
Required Methods
Provided Methods
fn partial_complete(
&mut self,
line: &str,
pos: usize,
start: usize,
offset: usize
) -> Vec<Suggestion>
fn partial_complete(
&mut self,
line: &str,
pos: usize,
start: usize,
offset: usize
) -> Vec<Suggestion>
action that will return a partial section of available completions this command comes handy when trying to avoid to pull all the data at once from the completer
fn total_completions(&mut self, line: &str, pos: usize) -> usize
fn total_completions(&mut self, line: &str, pos: usize) -> usize
number of available completions