pub struct MatchingBracketHighlighter { /* private fields */ }Expand description
Highlight matching bracket when typed or cursor moved on.
Implementations§
Trait Implementations§
Source§impl Default for MatchingBracketHighlighter
 
impl Default for MatchingBracketHighlighter
Source§fn default() -> MatchingBracketHighlighter
 
fn default() -> MatchingBracketHighlighter
Returns the “default value” for a type. Read more
Source§impl Highlighter for MatchingBracketHighlighter
 
impl Highlighter for MatchingBracketHighlighter
Source§fn highlight<'l>(&self, line: &'l str, _pos: usize) -> Cow<'l, str>
 
fn highlight<'l>(&self, line: &'l str, _pos: usize) -> Cow<'l, str>
Takes the currently edited 
line with the cursor position and
returns the highlighted version (with ANSI color). Read moreSource§fn highlight_char(&self, line: &str, pos: usize, kind: CmdKind) -> bool
 
fn highlight_char(&self, line: &str, pos: usize, kind: CmdKind) -> bool
Tells if 
line needs to be highlighted when a specific char is typed or
when cursor is moved under a specific char. Read moreSource§fn highlight_prompt<'b, 's: 'b, 'p: 'b>(
    &'s self,
    prompt: &'p str,
    default: bool,
) -> Cow<'b, str>
 
fn highlight_prompt<'b, 's: 'b, 'p: 'b>( &'s self, prompt: &'p str, default: bool, ) -> Cow<'b, str>
Takes the 
prompt and
returns the highlighted version (with ANSI color).Source§fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str>
 
fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str>
Takes the 
hint and
returns the highlighted version (with ANSI color).Source§fn highlight_candidate<'c>(
    &self,
    candidate: &'c str,
    completion: CompletionType,
) -> Cow<'c, str>
 
fn highlight_candidate<'c>( &self, candidate: &'c str, completion: CompletionType, ) -> Cow<'c, str>
Takes the completion 
candidate and
returns the highlighted version (with ANSI color). Read moreAuto Trait Implementations§
impl !Freeze for MatchingBracketHighlighter
impl !RefUnwindSafe for MatchingBracketHighlighter
impl Send for MatchingBracketHighlighter
impl !Sync for MatchingBracketHighlighter
impl Unpin for MatchingBracketHighlighter
impl UnwindSafe for MatchingBracketHighlighter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more