pub struct ReplHelper {}
Implementations§
Source§impl ReplHelper
impl ReplHelper
Trait Implementations§
Source§impl Completer for ReplHelper
impl Completer for ReplHelper
Source§impl Highlighter for ReplHelper
impl Highlighter for ReplHelper
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).§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 pos
ition 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,
fn highlight_prompt<'b, 's, 'p>(
&'s self,
prompt: &'p str,
default: bool,
) -> Cow<'b, str>where
's: 'b,
'p: 'b,
Takes the
prompt
and
returns the highlighted version (with ANSI color).Source§impl Hinter for ReplHelper
impl Hinter for ReplHelper
Source§type Hint = HinterMatch
type Hint = HinterMatch
Specific hint type
Source§impl Validator for ReplHelper
impl Validator for ReplHelper
Source§fn validate(&self, _: &mut ValidationContext<'_>) -> Result<ValidationResult>
fn validate(&self, _: &mut ValidationContext<'_>) -> Result<ValidationResult>
Takes the currently edited
input
and returns a
ValidationResult
indicating whether it is valid or not along
with an option message to display about the result. The most
common validity check to implement is probably whether the
input is complete or not, for instance ensuring that all
delimiters are fully balanced. Read more§fn validate_while_typing(&self) -> bool
fn validate_while_typing(&self) -> bool
Configure whether validation is performed while typing or only
when user presses the Enter key. Read more
impl Helper for ReplHelper
Auto Trait Implementations§
impl Freeze for ReplHelper
impl RefUnwindSafe for ReplHelper
impl Send for ReplHelper
impl Sync for ReplHelper
impl Unpin for ReplHelper
impl UnwindSafe for ReplHelper
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more