pub struct SelectState {
pub selected: usize,
pub count: usize,
pub scroll_offset: usize,
pub max_visible: Option<usize>,
}Expand description
Helper struct for managing select state.
Fields§
§selected: usizeCurrently selected index.
count: usizeNumber of items.
scroll_offset: usizeScroll offset for long lists.
max_visible: Option<usize>Maximum visible items.
Implementations§
Source§impl SelectState
impl SelectState
Sourcepub fn max_visible(self, max: usize) -> Self
pub fn max_visible(self, max: usize) -> Self
Set maximum visible items.
Trait Implementations§
Source§impl Clone for SelectState
impl Clone for SelectState
Source§fn clone(&self) -> SelectState
fn clone(&self) -> SelectState
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 SelectState
impl RefUnwindSafe for SelectState
impl Send for SelectState
impl Sync for SelectState
impl Unpin for SelectState
impl UnwindSafe for SelectState
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