Struct reedline::DefaultHinter
source · pub struct DefaultHinter { /* private fields */ }
Expand description
A hinter that uses the completions or the history to show a hint to the user
Implementations§
source§impl DefaultHinter
impl DefaultHinter
sourcepub fn with_style(self, style: Style) -> Self
pub fn with_style(self, style: Style) -> Self
A builder that sets the style applied to the hint as part of the buffer
sourcepub fn with_min_chars(self, min_chars: usize) -> Self
pub fn with_min_chars(self, min_chars: usize) -> Self
A builder that sets the number of characters that have to be present to enable history hints
Trait Implementations§
source§impl Default for DefaultHinter
impl Default for DefaultHinter
source§impl Hinter for DefaultHinter
impl Hinter for DefaultHinter
source§fn handle(
&mut self,
line: &str,
pos: usize,
history: &dyn History,
use_ansi_coloring: bool
) -> String
fn handle( &mut self, line: &str, pos: usize, history: &dyn History, use_ansi_coloring: bool ) -> String
Handle the hinting duty by using the line, position, and current history Read more
source§fn complete_hint(&self) -> String
fn complete_hint(&self) -> String
Return the current hint unformatted to perform the completion of the full hint
source§fn next_hint_token(&self) -> String
fn next_hint_token(&self) -> String
Return the first semantic token of the hint
for incremental completion
Auto Trait Implementations§
impl Freeze for DefaultHinter
impl RefUnwindSafe for DefaultHinter
impl Send for DefaultHinter
impl Sync for DefaultHinter
impl Unpin for DefaultHinter
impl UnwindSafe for DefaultHinter
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