Trait Completer

trait Completer

To be called for tab-completion.

Associated Types

type Candidate: TraitBound { trait_: Path { path: "Candidate", id: Id(136), args: None }, generic_params: [], modifier: None }

Specific completion candidate.

Provided Methods

fn complete(self: &Self, line: &str, pos: usize, ctx: &Context<'_>) -> Result<(usize, Vec<<Self as >::Candidate>)>

Takes the currently edited line with the cursor position 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/"]))

fn update(self: &Self, line: &mut LineBuffer, start: usize, elected: &str, cl: &mut Changeset)

Updates the edited line with the elected candidate.

Implementors