Struct reedline::DefaultHinter
source · [−]pub struct DefaultHinter { /* private fields */ }
Expand description
A hinter that use the completions or the history to show a hint to the user
Similar to fish
autosuggestins
Implementations
sourceimpl 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
sourceimpl Default for DefaultHinter
impl Default for DefaultHinter
sourceimpl Hinter for DefaultHinter
impl Hinter for DefaultHinter
sourcefn 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
sourcefn complete_hint(&self) -> String
fn complete_hint(&self) -> String
Return the current hint unformatted to perform the completion of the full hint
sourcefn next_hint_token(&self) -> String
fn next_hint_token(&self) -> String
Return the first semantic token of the hint for incremental completion Read more
Auto Trait Implementations
impl RefUnwindSafe for DefaultHinter
impl Send for DefaultHinter
impl Sync for DefaultHinter
impl Unpin for DefaultHinter
impl UnwindSafe for DefaultHinter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more