#[repr(transparent)]pub(crate) struct ObjectMap<K, V>(UnsafeCell<IndexMap<K, V>>);
Expand description
A HashMap that can hold values past garbage collection.
This type is needed because Garbage Collection can move keys, which changes
their hash value. ObjectMap
will rehash the keys after collection.
Tuple Fields§
§0: UnsafeCell<IndexMap<K, V>>
Trait Implementations§
Auto Trait Implementations§
impl<K, V> !Freeze for ObjectMap<K, V>
impl<K, V> !RefUnwindSafe for ObjectMap<K, V>
impl<K, V> Send for ObjectMap<K, V>
impl<K, V> !Sync for ObjectMap<K, V>
impl<K, V> Unpin for ObjectMap<K, V>
impl<K, V> UnwindSafe for ObjectMap<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