pub struct AndonPrompt { /* private fields */ }Expand description
Andon-style prompt for REPL
Implementations§
Source§impl AndonPrompt
impl AndonPrompt
Sourcepub fn render(session: &ReplSession) -> String
pub fn render(session: &ReplSession) -> String
Render prompt string from session state (plain text)
Sourcepub fn render_colored(session: &ReplSession) -> String
pub fn render_colored(session: &ReplSession) -> String
Render prompt with colors for terminal
Trait Implementations§
Source§impl Default for AndonPrompt
impl Default for AndonPrompt
Source§impl Prompt for AndonPrompt
Available on crate feature repl only.
impl Prompt for AndonPrompt
Available on crate feature
repl only.Source§fn render_prompt_left(&self) -> Cow<'_, str>
fn render_prompt_left(&self) -> Cow<'_, str>
Provide content of the left full prompt
Source§fn render_prompt_right(&self) -> Cow<'_, str>
fn render_prompt_right(&self) -> Cow<'_, str>
Provide content of the right full prompt
Source§fn render_prompt_indicator(&self, _prompt_mode: PromptEditMode) -> Cow<'_, str>
fn render_prompt_indicator(&self, _prompt_mode: PromptEditMode) -> Cow<'_, str>
Render the prompt indicator (Last part of the prompt that changes based on the editor mode)
Source§fn render_prompt_multiline_indicator(&self) -> Cow<'_, str>
fn render_prompt_multiline_indicator(&self) -> Cow<'_, str>
Indicator to show before explicit new lines
Source§fn render_prompt_history_search_indicator(
&self,
_history_search: PromptHistorySearch,
) -> Cow<'_, str>
fn render_prompt_history_search_indicator( &self, _history_search: PromptHistorySearch, ) -> Cow<'_, str>
Render the prompt indicator for
Ctrl-R history searchSource§fn get_prompt_color(&self) -> Color
fn get_prompt_color(&self) -> Color
Get the default prompt color
Source§fn get_prompt_multiline_color(&self) -> Color
fn get_prompt_multiline_color(&self) -> Color
Get the default multiline prompt color
Source§fn get_indicator_color(&self) -> Color
fn get_indicator_color(&self) -> Color
Get the default indicator color
Source§fn get_prompt_right_color(&self) -> Color
fn get_prompt_right_color(&self) -> Color
Get the default right prompt color
Source§fn right_prompt_on_last_line(&self) -> bool
fn right_prompt_on_last_line(&self) -> bool
Whether to render right prompt on the last line
Auto Trait Implementations§
impl Freeze for AndonPrompt
impl RefUnwindSafe for AndonPrompt
impl Send for AndonPrompt
impl Sync for AndonPrompt
impl Unpin for AndonPrompt
impl UnsafeUnpin for AndonPrompt
impl UnwindSafe for AndonPrompt
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreCreates a shared type from an unshared type.