pub struct Basic;
Expand description
A basic editor with no extra features.
Trait Implementations§
Source§impl Editor for Basic
impl Editor for Basic
Source§fn highlight(&self, buffer: &str) -> String
fn highlight(&self, buffer: &str) -> String
Highlights the current input by adding ANSI color sequences. Read more
Source§fn highlight_prompt(&self, prompt: &str, multiline: bool) -> String
fn highlight_prompt(&self, prompt: &str, multiline: bool) -> String
Highlights the current prompt. Read more
Source§fn hint(&self, buffer: &str) -> Option<String>
fn hint(&self, buffer: &str) -> Option<String>
Returns a hint for the current input, if available. Read more
Source§fn complete(&self, buffer: &str, cursor: usize) -> Option<Completion>
fn complete(&self, buffer: &str, cursor: usize) -> Option<Completion>
Provides completion if available. Read more
Source§fn indent(&self, buffer: &mut String, cursor: &mut usize)
fn indent(&self, buffer: &mut String, cursor: &mut usize)
Inserts indentation at the current cursor position when
Editor::complete
returns none.Source§fn is_multiline(&self, buffer: &str, cursor: usize) -> bool
fn is_multiline(&self, buffer: &str, cursor: usize) -> bool
Returns
true
if the current input should be continued on another line.Source§fn is_keyword(c: char) -> bool
fn is_keyword(c: char) -> bool
Returns
true
if the given character is a word character. Read moreAuto Trait Implementations§
impl Freeze for Basic
impl RefUnwindSafe for Basic
impl Send for Basic
impl Sync for Basic
impl Unpin for Basic
impl UnwindSafe for Basic
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