Trait reedline::Prompt[][src]

pub trait Prompt {
    fn render_prompt(&self, screen_width: usize) -> Cow<'_, str>;
fn render_prompt_indicator(
        &self,
        prompt_mode: PromptEditMode
    ) -> Cow<'_, str>;
fn render_prompt_multiline_indicator(&self) -> Cow<'_, str>;
fn render_prompt_history_search_indicator(
        &self,
        history_search: PromptHistorySearch
    ) -> Cow<'_, str>; fn get_prompt_color(&self) -> Color { ... } }
Expand description

API to provide a custom prompt.

Implementors have to provide str-based content which will be displayed before the LineBuffer is drawn.

Required methods

Provide content off the full prompt. May use a line above the entry buffer that fits into screen_width.

Render the default prompt indicator

Render the default prompt indicator

Render the default prompt indicator

Provided methods

Render the vi insert mode prompt indicator Get back the prompt color

Implementors