[][src]Struct boxxy::completer::CmdCompleter

pub struct CmdCompleter(_);

Methods

impl CmdCompleter[src]

pub fn new(toolbox: Arc<Mutex<Toolbox>>) -> CmdCompleter[src]

Trait Implementations

impl Completer for CmdCompleter[src]

type Candidate = String

fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)[src]

Updates the edited line with the elected candidate.

impl Highlighter for CmdCompleter[src]

fn highlight(&self, line: &'l str, pos: usize) -> Cow<'l, str>[src]

Takes the currently edited line with the cursor position and returns the highlighted version (with ANSI color). Read more

fn highlight_prompt<'b, 's, 'p>(
    &'s self,
    prompt: &'p str,
    default: bool
) -> Cow<'b, str> where
    's: 'b,
    'p: 'b, 
[src]

Takes the prompt and returns the highlighted version (with ANSI color). Read more

fn highlight_candidate(
    &self,
    candidate: &'c str,
    completion: CompletionType
) -> Cow<'c, str>
[src]

Takes the completion candidate and returns the highlighted version (with ANSI color). Read more

fn highlight_char(&self, line: &str, pos: usize) -> bool[src]

Tells if line needs to be highlighted when a specific char is typed or when cursor is moved under a specific char. Read more

impl Helper for CmdCompleter[src]

impl Hinter for CmdCompleter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Same<T> for T

type Output = T

Should always be Self