Struct rkyv::collections::index_map::ArchivedIndexMap
source · [−]pub struct ArchivedIndexMap<K, V> { /* private fields */ }
Expand description
An archived IndexMap
.
Implementations
sourceimpl<K, V> ArchivedIndexMap<K, V>
impl<K, V> ArchivedIndexMap<K, V>
sourcepub fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool where
K: Borrow<Q>,
Q: Hash + Eq,
Returns whether a key is present in the hash map.
sourcepub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V> where
K: Borrow<Q>,
Q: Hash + Eq,
Gets the value associated with the given key.
sourcepub fn get_full<Q: ?Sized>(&self, k: &Q) -> Option<(usize, &K, &V)> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn get_full<Q: ?Sized>(&self, k: &Q) -> Option<(usize, &K, &V)> where
K: Borrow<Q>,
Q: Hash + Eq,
Gets the index, key, and value associated with the given key.
sourcepub fn get_index_of<Q: ?Sized>(&self, key: &Q) -> Option<usize> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn get_index_of<Q: ?Sized>(&self, key: &Q) -> Option<usize> where
K: Borrow<Q>,
Q: Hash + Eq,
Gets the index of a key if it exists in the map.
sourcepub fn get_key_value<Q: ?Sized>(&self, k: &Q) -> Option<(&K, &V)> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn get_key_value<Q: ?Sized>(&self, k: &Q) -> Option<(&K, &V)> where
K: Borrow<Q>,
Q: Hash + Eq,
Gets the key-value pair associated with the given key.
sourcepub fn hasher(&self) -> HashBuilder
pub fn hasher(&self) -> HashBuilder
Gets the hasher for this index map.
sourcepub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
pub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
Returns an iterator over the key-value pairs of the map in order
sourcepub fn keys(&self) -> Keys<'_, K, V>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;
pub fn keys(&self) -> Keys<'_, K, V>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;
Returns an iterator over the keys of the map in order
sourcepub fn values(&self) -> Values<'_, K, V>ⓘNotable traits for Values<'a, K, V>impl<'a, K, V> Iterator for Values<'a, K, V> type Item = &'a V;
pub fn values(&self) -> Values<'_, K, V>ⓘNotable traits for Values<'a, K, V>impl<'a, K, V> Iterator for Values<'a, K, V> type Item = &'a V;
Returns an iterator over the values of the map in order.
sourcepub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: IndexMapResolver,
out: *mut Self
)
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: IndexMapResolver,
out: *mut Self
)
Resolves an archived index map from a given length and parameters.
Safety
len
must be the number of elements that were serializedpos
must be the position ofout
within the archiveresolver
must be the result of serializing a hash map
Trait Implementations
sourceimpl<K: Debug, V: Debug> Debug for ArchivedIndexMap<K, V>
impl<K: Debug, V: Debug> Debug for ArchivedIndexMap<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for ArchivedIndexMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for ArchivedIndexMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for ArchivedIndexMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> !Unpin for ArchivedIndexMap<K, V>
impl<K, V> UnwindSafe for ArchivedIndexMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more