pub struct VirtualMachinePrompt<'c> {
pub vm: &'c VirtualMachine<'c>,
}Fields§
§vm: &'c VirtualMachine<'c>Implementations§
Source§impl<'c> VirtualMachinePrompt<'c>
impl<'c> VirtualMachinePrompt<'c>
pub fn new(vm: &VirtualMachine<'c>) -> VirtualMachinePrompt<'c>
Trait Implementations§
Source§impl<'c> Completer for VirtualMachinePrompt<'c>
impl<'c> Completer for VirtualMachinePrompt<'c>
Source§type Candidate = DummyCandidate
type Candidate = DummyCandidate
Specific completion candidate.
Source§impl<'c> Highlighter for VirtualMachinePrompt<'c>
impl<'c> Highlighter for VirtualMachinePrompt<'c>
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_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<'h>(
&self,
candidate: &'h str,
completion: CompletionType,
) -> Cow<'h, str>
fn highlight_candidate<'h>( &self, candidate: &'h str, completion: CompletionType, ) -> Cow<'h, str>
Takes the completion
candidate and
returns the highlighted version (with ANSI color). Read moreSource§impl<'c> Hinter for VirtualMachinePrompt<'c>
impl<'c> Hinter for VirtualMachinePrompt<'c>
Source§impl<'c> Validator for VirtualMachinePrompt<'c>
impl<'c> Validator for VirtualMachinePrompt<'c>
Source§fn validate(&self, ctx: &mut ValidationContext<'_>) -> Result<ValidationResult>
fn validate(&self, ctx: &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 moreSource§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<'c> Helper for VirtualMachinePrompt<'c>
Auto Trait Implementations§
impl<'c> Freeze for VirtualMachinePrompt<'c>
impl<'c> RefUnwindSafe for VirtualMachinePrompt<'c>
impl<'c> !Send for VirtualMachinePrompt<'c>
impl<'c> !Sync for VirtualMachinePrompt<'c>
impl<'c> Unpin for VirtualMachinePrompt<'c>
impl<'c> UnwindSafe for VirtualMachinePrompt<'c>
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