Trait Completer
pub trait Completer
To be called for tab-completion.
Associated Types
type Candidate: Candidate;Specific completion candidate.
Provided Methods
fn complete(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Result<(usize, Vec<Self::Candidate>)>Takes the currently edited
linewith the cursorposition 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, line: &mut LineBuffer, start: usize, elected: &str, cl: &mut Changeset)Updates the edited
linewith theelectedcandidate.