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

#[repr(C)]pub struct ArchivedHashMap<K, V> { /* fields omitted */ }

An archived HashMap. This is a direct port of the standard library hashbrown hash map for rkyv.

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 get_key_value<Q: ?Sized>(&self, k: &Q) -> Option<(&K, &V)> where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Finds the key-value pair 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]

Get the mutable value associated with the given key.

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

Gets the hasher for the hash map.

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

Returns whether there are no items in the hash map.

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 pairs 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 pairs 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<ArchiveContext> + Eq + Hash, V: CheckBytes<ArchiveContext>> CheckBytes<ArchiveContext> for ArchivedHashMap<K, V>[src]

type Error = ArchivedHashMapError<K::Error, V::Error>

The error that may result from validating the type.

impl<K: Debug, V: Debug> Debug for ArchivedHashMap<K, V>[src]

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 + Borrow<AK>, V, AK: Hash + Eq, AV: PartialEq<V>> PartialEq<ArchivedHashMap<AK, AV>> for HashMap<K, V>[src]

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> 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, 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.