Struct rkyv::std_impl::chd::ArchivedHashMap[][src]

pub struct ArchivedHashMap<K, V> { /* fields omitted */ }

An archived HashMap.

Implementations

impl<K: Hash + Eq, V> ArchivedHashMap<K, V>[src]

pub fn len(&self) -> usize[src]

Gets the number of items in the hash map.

pub fn hasher(&self) -> SeaHasher[src]

Gets the hasher for this hashmap. The hasher for all archived hashmaps is the same for reproducibility.

pub fn get_key_value<Q: ?Sized>(&self, k: &Q) -> Option<(&K, &V)> where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Finds the key-value entry for a key.

pub fn get_key_value_pin<Q: ?Sized>(
    self: Pin<&mut Self>,
    k: &Q
) -> Option<(&K, Pin<&mut V>)> where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Finds the mutable key-value entry for a key.

pub fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Returns whether a key is present in the hash map.

pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V> where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Gets the value associated with the given key.

pub fn get_pin<Q: ?Sized>(self: Pin<&mut Self>, k: &Q) -> Option<Pin<&mut V>> where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Gets the mutable value associated with the given key.

pub fn is_empty(&self) -> bool[src]

Returns whether there are no items in the hashmap.

pub fn iter(&self) -> Iter<'_, K, V>

Notable traits for Iter<'a, K, V>

impl<'a, K: Hash + Eq, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
[src]

Gets an iterator over the key-value entries in the hash map.

pub fn iter_pin(self: Pin<&mut Self>) -> IterPin<'_, K, V>

Notable traits for IterPin<'a, K, V>

impl<'a, K: Hash + Eq, V> Iterator for IterPin<'a, K, V> type Item = (&'a K, Pin<&'a mut V>);
[src]

Gets an iterator over the mutable key-value entries in the hash map.

pub fn keys(&self) -> Keys<'_, K, V>

Notable traits for Keys<'a, K, V>

impl<'a, K: Hash + Eq, V> Iterator for Keys<'a, K, V> type Item = &'a K;
[src]

Gets an iterator over the keys in the hash map.

pub fn values(&self) -> Values<'_, K, V>

Notable traits for Values<'a, K, V>

impl<'a, K: Hash + Eq, V> Iterator for Values<'a, K, V> type Item = &'a V;
[src]

Gets an iterator over the values in the hash map.

pub fn values_pin(self: Pin<&mut Self>) -> ValuesPin<'_, K, V>

Notable traits for ValuesPin<'a, K, V>

impl<'a, K: Hash + Eq, V> Iterator for ValuesPin<'a, K, V> type Item = Pin<&'a mut V>;
[src]

Gets an iterator over the mutable values in the hash map.

Trait Implementations

impl<K: CheckBytes<C> + Eq + Hash, V: CheckBytes<C>, C: ArchiveBoundsContext + ArchiveMemoryContext + Fallible + ?Sized> CheckBytes<C> for ArchivedHashMap<K, V> where
    C::Error: Error
[src]

type Error = HashMapError<K::Error, V::Error, C::Error>

The error that may result from checking the type.

impl<K: Hash + Eq, V: Eq> Eq for ArchivedHashMap<K, V>[src]

impl<K: Eq + Hash + Borrow<Q>, Q: Eq + Hash + ?Sized, V> Index<&'_ Q> for ArchivedHashMap<K, V>[src]

type Output = V

The returned type after indexing.

impl<K: Hash + Eq, V: PartialEq> PartialEq<ArchivedHashMap<K, V>> for ArchivedHashMap<K, V>[src]

impl<K: Hash + Eq + Borrow<AK>, V, AK: Hash + Eq, AV: PartialEq<V>> PartialEq<HashMap<K, V, RandomState>> for ArchivedHashMap<AK, AV>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointee for T[src]

type Metadata = ()

The type for metadata in pointers and references to Self.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.