Trait mg::completion::Completer
[−]
[src]
pub trait Completer { fn completions(&mut self, input: &str) -> Vec<CompletionResult>; fn columns(&self) -> Vec<Column> { ... } fn column_count(&self) -> usize { ... } fn complete_result(&self, value: &str) -> String { ... } fn text_column(&self) -> i32 { ... } }
The trait completer is an interface to be satisfied by input completers.
Required Methods
fn completions(&mut self, input: &str) -> Vec<CompletionResult>
From the user input, return the completion results. The results are on two columns, hence the 2-tuple.
Provided Methods
fn columns(&self) -> Vec<Column>
The number of columns of the completer.
fn column_count(&self) -> usize
The number of column.
fn complete_result(&self, value: &str) -> String
From the selected text entry, return the text that should be written in the text input.
fn text_column(&self) -> i32
Set the column to use as the result of a selected text entry.
Implementors
impl<T: Clone> Completer for CommandCompleter<T>
impl Completer for NoCompleter
impl<T> Completer for SettingCompleter<T>