Struct reedline::CompletionMenu
source · [−]pub struct CompletionMenu { /* private fields */ }
Expand description
Completion menu definition
Implementations
sourceimpl CompletionMenu
impl CompletionMenu
sourcepub fn with_text_style(self, text_style: Style) -> Self
pub fn with_text_style(self, text_style: Style) -> Self
Menu builder with new value for text style
sourcepub fn with_selected_text_style(self, selected_text_style: Style) -> Self
pub fn with_selected_text_style(self, selected_text_style: Style) -> Self
Menu builder with new value for text style
sourcepub fn with_columns(self, columns: u16) -> Self
pub fn with_columns(self, columns: u16) -> Self
Menu builder with new columns value
sourcepub fn with_column_width(self, col_width: Option<usize>) -> Self
pub fn with_column_width(self, col_width: Option<usize>) -> Self
Menu builder with new column width value
sourcepub fn with_column_padding(self, col_padding: usize) -> Self
pub fn with_column_padding(self, col_padding: usize) -> Self
Menu builder with new column width value
sourcepub fn with_marker(self, marker: String) -> Self
pub fn with_marker(self, marker: String) -> Self
Menu builder with marker
Trait Implementations
sourceimpl Default for CompletionMenu
impl Default for CompletionMenu
sourceimpl Menu for CompletionMenu
impl Menu for CompletionMenu
sourcefn can_partially_complete(
&mut self,
values_updated: bool,
line_buffer: &mut LineBuffer,
history: &dyn History,
completer: &dyn Completer
) -> bool
fn can_partially_complete(
&mut self,
values_updated: bool,
line_buffer: &mut LineBuffer,
history: &dyn History,
completer: &dyn Completer
) -> bool
The completion menu can try to find the common string and replace it in the given line buffer
Selects what type of event happened with the menu
sourcefn update_values(
&mut self,
line_buffer: &mut LineBuffer,
_history: &dyn History,
completer: &dyn Completer
)
fn update_values(
&mut self,
line_buffer: &mut LineBuffer,
_history: &dyn History,
completer: &dyn Completer
)
Updates menu values
sourcefn update_working_details(
&mut self,
line_buffer: &mut LineBuffer,
history: &dyn History,
completer: &dyn Completer,
painter: &Painter
)
fn update_working_details(
&mut self,
line_buffer: &mut LineBuffer,
history: &dyn History,
completer: &dyn Completer,
painter: &Painter
)
The working details for the menu changes based on the size of the lines collected from the completer
sourcefn replace_in_buffer(&self, line_buffer: &mut LineBuffer)
fn replace_in_buffer(&self, line_buffer: &mut LineBuffer)
The buffer gets replaced in the Span location
sourcefn get_values(&self) -> &[(Span, String)]
fn get_values(&self) -> &[(Span, String)]
Gets values from filler that will be displayed in the menu
Calculates the real required lines for the menu considering how many lines wrap the terminal or if entries have multiple lines Read more
Creates the menu representation as a string which will be painted by the painter
Auto Trait Implementations
impl RefUnwindSafe for CompletionMenu
impl Send for CompletionMenu
impl Sync for CompletionMenu
impl Unpin for CompletionMenu
impl UnwindSafe for CompletionMenu
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more