pub struct ModalListState {
pub items: Vec<ModalListItem>,
pub visible_indices: Vec<usize>,
pub list_state: ListState,
pub total_selectable: usize,
pub filter_terms: Vec<String>,
pub filter_query: Option<String>,
pub viewport_rows: Option<u16>,
pub compact_rows: bool,
}Fields§
§items: Vec<ModalListItem>§visible_indices: Vec<usize>§list_state: ListState§total_selectable: usize§filter_terms: Vec<String>§filter_query: Option<String>§viewport_rows: Option<u16>§compact_rows: boolImplementations§
Source§impl ModalListState
impl ModalListState
pub fn new( items: Vec<InlineListItem>, selected: Option<InlineListSelection>, ) -> Self
pub fn current_selection(&self) -> Option<InlineListSelection>
pub fn get_best_matching_item(&self, query: &str) -> Option<String>
pub fn select_previous(&mut self)
pub fn select_next(&mut self)
pub fn select_first(&mut self)
pub fn select_last(&mut self)
pub fn select_nth_selectable(&mut self, target_index: usize) -> bool
pub fn page_up(&mut self)
pub fn page_down(&mut self)
pub fn set_viewport_rows(&mut self, rows: u16)
pub fn apply_search(&mut self, query: &str)
pub fn apply_search_with_preference( &mut self, query: &str, preferred: Option<InlineListSelection>, )
pub fn toggle_row_density(&mut self)
Trait Implementations§
Source§impl Clone for ModalListState
impl Clone for ModalListState
Source§fn clone(&self) -> ModalListState
fn clone(&self) -> ModalListState
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 moreAuto Trait Implementations§
impl Freeze for ModalListState
impl RefUnwindSafe for ModalListState
impl Send for ModalListState
impl Sync for ModalListState
impl Unpin for ModalListState
impl UnsafeUnpin for ModalListState
impl UnwindSafe for ModalListState
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> 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