pub struct ListState {
pub items: Vec<String>,
pub selected: usize,
}Expand description
State for a selectable list widget.
Pass a mutable reference to Context::list each frame. Up/Down arrow
keys (and k/j) move the selection when the widget is focused.
Fields§
§items: Vec<String>The list items as display strings.
selected: usizeIndex of the currently selected item.
Implementations§
Auto Trait Implementations§
impl Freeze for ListState
impl RefUnwindSafe for ListState
impl Send for ListState
impl Sync for ListState
impl Unpin for ListState
impl UnsafeUnpin for ListState
impl UnwindSafe for ListState
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