Struct rkyv::collections::hash_map::ArchivedHashMap [−][src]
pub struct ArchivedHashMap<K, V> { /* fields omitted */ }
Expand description
An archived HashMap
.
Implementations
Gets the hasher for this hashmap. The hasher for all archived hashmaps is the same for reproducibility.
Finds the key-value entry for a key.
Finds the mutable key-value entry for a key.
Returns whether a key is present in the hash map.
Gets the value associated with the given key.
Gets the mutable value associated with the given key.
Gets an iterator over the key-value entries in the hash map.
Gets an iterator over the mutable key-value entries in the hash map.
Gets an iterator over the keys in the hash map.
Gets an iterator over the values in the hash map.
Gets an iterator over the mutable values in the hash map.
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: HashMapResolver,
out: *mut Self
)
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: HashMapResolver,
out: *mut Self
)
Resolves an archived hash 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
impl<K, V, C: ?Sized> CheckBytes<C> for ArchivedHashMap<K, V> where
K: CheckBytes<C> + Eq + Hash,
V: CheckBytes<C>,
C: ArchiveContext + ?Sized,
C::Error: Error,
impl<K, V, C: ?Sized> CheckBytes<C> for ArchivedHashMap<K, V> where
K: CheckBytes<C> + Eq + Hash,
V: CheckBytes<C>,
C: ArchiveContext + ?Sized,
C::Error: Error,
type Error = HashMapError<K::Error, V::Error, C::Error>
type Error = HashMapError<K::Error, V::Error, C::Error>
The error that may result from checking the type.
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
impl<K: Archive + Hash + Eq, V: Archive, D: Fallible + ?Sized, S: Default + BuildHasher> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<K::Archived, V::Archived> where
K::Archived: Deserialize<K, D> + Hash + Eq,
V::Archived: Deserialize<V, D>,
impl<K: Archive + Hash + Eq, V: Archive, D: Fallible + ?Sized, S: Default + BuildHasher> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<K::Archived, V::Archived> where
K::Archived: Deserialize<K, D> + Hash + Eq,
V::Archived: Deserialize<V, D>,
Auto Trait Implementations
impl<K, V> RefUnwindSafe for ArchivedHashMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for ArchivedHashMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for ArchivedHashMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> !Unpin for ArchivedHashMap<K, V>
impl<K, V> UnwindSafe for ArchivedHashMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more