Struct jiter::LazyIndexMap
source · pub struct LazyIndexMap<K, V> { /* private fields */ }
Expand description
Like IndexMap but only builds the lookup map when it’s needed.
Implementations§
source§impl<K, V> LazyIndexMap<K, V>
impl<K, V> LazyIndexMap<K, V>
Like IndexMap but only builds the lookup map when it’s needed.
pub fn new() -> Self
pub fn insert(&mut self, key: K, value: V)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn keys(&self) -> impl Iterator<Item = &K>
pub fn iter(&self) -> SliceIter<'_, (K, V)>
pub fn iter_unique(&self) -> impl Iterator<Item = (&K, &V)>
Trait Implementations§
source§impl<K, V> Debug for LazyIndexMap<K, V>
impl<K, V> Debug for LazyIndexMap<K, V>
source§impl<K, V> Default for LazyIndexMap<K, V>
impl<K, V> Default for LazyIndexMap<K, V>
Auto Trait Implementations§
impl<K, V> !Freeze for LazyIndexMap<K, V>
impl<K, V> RefUnwindSafe for LazyIndexMap<K, V>
impl<K, V> Send for LazyIndexMap<K, V>
impl<K, V> Sync for LazyIndexMap<K, V>
impl<K, V> Unpin for LazyIndexMap<K, V>
impl<K, V> UnwindSafe for LazyIndexMap<K, V>
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