pub struct PromptText(/* private fields */);Implementations§
Source§impl PromptText
impl PromptText
pub fn new() -> PromptText
pub fn set(&self, t: Option<String>)
pub fn render_as_reedline_prompt(&self) -> DefaultPrompt
Trait Implementations§
Source§impl Clone for PromptText
impl Clone for PromptText
Source§fn clone(&self) -> PromptText
fn clone(&self) -> PromptText
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Prompt for PromptText
impl Prompt for PromptText
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 PromptText
impl RefUnwindSafe for PromptText
impl Send for PromptText
impl Sync for PromptText
impl Unpin for PromptText
impl UnwindSafe for PromptText
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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