pub struct RapsPrompt;Expand description
RAPS interactive prompt with proper styled/raw separation.
The Prompt trait separates the raw text content from styling, so reedline can calculate cursor position from plain text width while still displaying a colored prompt.
Trait Implementations§
Source§impl Prompt for RapsPrompt
impl Prompt for RapsPrompt
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 RapsPrompt
impl RefUnwindSafe for RapsPrompt
impl Send for RapsPrompt
impl Sync for RapsPrompt
impl Unpin for RapsPrompt
impl UnsafeUnpin for RapsPrompt
impl UnwindSafe for RapsPrompt
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 more