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

From the user input, return the completion results. The results are on two columns, hence the 2-tuple.

Provided Methods

The number of columns of the completer.

The number of column.

From the selected text entry, return the text that should be written in the text input.

Set the column to use as the result of a selected text entry.

Implementors