pub struct KeySetSelection<'a, K>{ /* private fields */ }Expand description
Index-based selection storage backed by a key slice + HashSet of selected keys.
This is convenient when your application stores selection as a set of
arbitrary keys (e.g. HashSet<u32> or HashSet<MyId>), but you still
want to drive a multi-select scope using contiguous indices.
Implementations§
Source§impl<'a, K> KeySetSelection<'a, K>
impl<'a, K> KeySetSelection<'a, K>
Trait Implementations§
Source§impl<'a, K> MultiSelectIndexStorage for KeySetSelection<'a, K>
impl<'a, K> MultiSelectIndexStorage for KeySetSelection<'a, K>
Source§fn is_selected(&self, index: usize) -> bool
fn is_selected(&self, index: usize) -> bool
Returns whether item at
index is currently selected.Source§fn set_selected(&mut self, index: usize, selected: bool)
fn set_selected(&mut self, index: usize, selected: bool)
Updates selection state for item at
index.Auto Trait Implementations§
impl<'a, K> Freeze for KeySetSelection<'a, K>
impl<'a, K> RefUnwindSafe for KeySetSelection<'a, K>where
K: RefUnwindSafe,
impl<'a, K> Send for KeySetSelection<'a, K>
impl<'a, K> Sync for KeySetSelection<'a, K>where
K: Sync,
impl<'a, K> Unpin for KeySetSelection<'a, K>
impl<'a, K> !UnwindSafe for KeySetSelection<'a, K>
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