pub struct Map<K, V>(pub IndexMap<K, V>);Tuple Fields§
§0: IndexMap<K, V>Implementations§
Source§impl<K: Hash + Eq, V> Map<K, V>
impl<K: Hash + Eq, V> Map<K, V>
pub fn get(&self, key: &K) -> Option<&V>
pub fn insert(&mut self, key: K, value: V) -> Option<V>
Sourcepub fn remove_fast(&mut self, key: &K) -> Option<V>
pub fn remove_fast(&mut self, key: &K) -> Option<V>
O(1) removal, may reorder remaining keys. Use when order doesn’t matter (e.g., batch processing).
Sourcepub fn remove_ordered(&mut self, key: &K) -> Option<V>
pub fn remove_ordered(&mut self, key: &K) -> Option<V>
O(n) removal, preserves document order. Use when order must be maintained.
pub fn contains_key(&self, key: &K) -> bool
Trait Implementations§
Source§impl<K, V> IntoDocument for Map<K, V>
impl<K, V> IntoDocument for Map<K, V>
Source§fn write_to(self, c: &mut DocumentConstructor) -> Result<(), WriteError>
fn write_to(self, c: &mut DocumentConstructor) -> Result<(), WriteError>
Write this value to the current node in the document constructor.
Source§impl<'plural, K, V> IntoIterator for &'plural Map<K, V>
impl<'plural, K, V> IntoIterator for &'plural Map<K, V>
Source§impl<K, V> IntoIterator for Map<K, V>
impl<K, V> IntoIterator for Map<K, V>
Source§impl<'doc, K, T> ParseDocument<'doc> for Map<K, T>
impl<'doc, K, T> ParseDocument<'doc> for Map<K, T>
impl<K: Eq + Hash, V: Eq> Eq for Map<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for Map<K, V>
impl<K, V> RefUnwindSafe for Map<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Map<K, V>
impl<K, V> Sync for Map<K, V>
impl<K, V> Unpin for Map<K, V>
impl<K, V> UnwindSafe for Map<K, V>where
K: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.