pub struct MultiSelectState {
pub items: Vec<String>,
pub cursor: usize,
pub selected: HashSet<usize>,
}Expand description
State for a multi-select list.
Like ListState but allows toggling multiple items with Space.
Fields§
§items: Vec<String>Multi-select option labels.
cursor: usizeFocused option index used for keyboard navigation.
selected: HashSet<usize>Set of selected option indices.
Implementations§
Trait Implementations§
Source§impl Clone for MultiSelectState
impl Clone for MultiSelectState
Source§fn clone(&self) -> MultiSelectState
fn clone(&self) -> MultiSelectState
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 MultiSelectState
impl RefUnwindSafe for MultiSelectState
impl Send for MultiSelectState
impl Sync for MultiSelectState
impl Unpin for MultiSelectState
impl UnsafeUnpin for MultiSelectState
impl UnwindSafe for MultiSelectState
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