[−][src]Trait rustyline::completion::Completer
To be called for tab-completion.
Associated Types
Loading content...Provided methods
pub fn complete(
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
[src]
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
Takes the currently edited line
with the cursor pos
ition 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/"]))
pub fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)
[src]
Updates the edited line
with the elected
candidate.
Implementations on Foreign Types
impl Completer for ()
[src]
type Candidate = String
pub fn update(&self, _line: &mut LineBuffer, _start: usize, _elected: &str)
[src]
impl<'c, C: ?Sized + Completer> Completer for &'c C
[src]
type Candidate = C::Candidate
pub fn complete(
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
[src]
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
pub fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)
[src]
impl<C: ?Sized + Completer> Completer for Box<C>
[src]
type Candidate = C::Candidate
pub fn complete(
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
[src]
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
pub fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)
[src]
impl<C: ?Sized + Completer> Completer for Rc<C>
[src]
type Candidate = C::Candidate
pub fn complete(
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
[src]
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
pub fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)
[src]
impl<C: ?Sized + Completer> Completer for Arc<C>
[src]
type Candidate = C::Candidate
pub fn complete(
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>
[src]
&self,
line: &str,
pos: usize,
ctx: &Context<'_>
) -> Result<(usize, Vec<Self::Candidate>)>