pub struct SelectorMap<V> { /* private fields */ }Expand description
A map with a notion of an “active” or selected entry.
Implementations§
Source§impl<V: Clone> SelectorMap<V>
impl<V: Clone> SelectorMap<V>
pub fn new() -> Self
pub fn insert(&mut self, key: &str, value: V)
pub fn remove(&mut self, key: &str) -> bool
pub fn select(&mut self, key: &str) -> bool
pub fn deselect(&mut self)
pub fn selected_key(&self) -> Option<&str>
pub fn selected_value(&self) -> Option<&V>
pub fn get(&self, key: &str) -> Option<&V>
pub fn contains(&self, key: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> Vec<&str>
pub fn change_count(&self) -> u64
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for SelectorMap<V>
impl<V> RefUnwindSafe for SelectorMap<V>where
V: RefUnwindSafe,
impl<V> Send for SelectorMap<V>where
V: Send,
impl<V> Sync for SelectorMap<V>where
V: Sync,
impl<V> Unpin for SelectorMap<V>where
V: Unpin,
impl<V> UnsafeUnpin for SelectorMap<V>
impl<V> UnwindSafe for SelectorMap<V>where
V: UnwindSafe,
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