pub struct ArchivedHashMap<K, V, H = FxHasher64> { /* private fields */ }
Expand description
An archived SwissTable hash map.
Implementations§
Source§impl<K, V, H> ArchivedHashMap<K, V, H>
impl<K, V, H> ArchivedHashMap<K, V, H>
Sourcepub fn iter(&self) -> Iter<'_, K, V, H> ⓘ
pub fn iter(&self) -> Iter<'_, K, V, H> ⓘ
Returns an iterator over the key-value entries in the hash map.
Sourcepub fn iter_seal(this: Seal<'_, Self>) -> IterMut<'_, K, V, H> ⓘ
pub fn iter_seal(this: Seal<'_, Self>) -> IterMut<'_, K, V, H> ⓘ
Returns an iterator over the sealed key-value entries in the hash map.
Sourcepub fn values(&self) -> Values<'_, K, V, H> ⓘ
pub fn values(&self) -> Values<'_, K, V, H> ⓘ
Returns an iterator over the values in the hash map.
Sourcepub fn values_seal(this: Seal<'_, Self>) -> ValuesMut<'_, K, V, H> ⓘ
pub fn values_seal(this: Seal<'_, Self>) -> ValuesMut<'_, K, V, H> ⓘ
Returns an iterator over the mutable values in the hash map.
Source§impl<K, V, H: Hasher + Default> ArchivedHashMap<K, V, H>
impl<K, V, H: Hasher + Default> ArchivedHashMap<K, V, H>
Sourcepub fn get_key_value_with<Q, C>(&self, key: &Q, cmp: C) -> Option<(&K, &V)>
pub fn get_key_value_with<Q, C>(&self, key: &Q, cmp: C) -> Option<(&K, &V)>
Returns the key-value pair corresponding to the supplied key using the given comparison function.
Sourcepub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
Returns the key-value pair corresponding to the supplied key.
Sourcepub fn get_with<Q, C>(&self, key: &Q, cmp: C) -> Option<&V>
pub fn get_with<Q, C>(&self, key: &Q, cmp: C) -> Option<&V>
Returns a reference to the value corresponding to the supplied key using the given comparison function.
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn get<Q>(&self, key: &Q) -> Option<&V>
Returns a reference to the value corresponding to the supplied key.
Sourcepub fn get_key_value_seal_with<'a, Q, C>(
this: Seal<'a, Self>,
key: &Q,
cmp: C,
) -> Option<(&'a K, Seal<'a, V>)>
pub fn get_key_value_seal_with<'a, Q, C>( this: Seal<'a, Self>, key: &Q, cmp: C, ) -> Option<(&'a K, Seal<'a, V>)>
Returns the mutable key-value pair corresponding to the supplied key using the given comparison function.
Sourcepub fn get_key_value_seal<'a, Q>(
this: Seal<'a, Self>,
key: &Q,
) -> Option<(&'a K, Seal<'a, V>)>
pub fn get_key_value_seal<'a, Q>( this: Seal<'a, Self>, key: &Q, ) -> Option<(&'a K, Seal<'a, V>)>
Returns the mutable key-value pair corresponding to the supplied key.
Sourcepub fn get_seal_with<'a, Q, C>(
this: Seal<'a, Self>,
key: &Q,
cmp: C,
) -> Option<Seal<'a, V>>
pub fn get_seal_with<'a, Q, C>( this: Seal<'a, Self>, key: &Q, cmp: C, ) -> Option<Seal<'a, V>>
Returns a mutable reference to the value corresponding to the supplied key using the given comparison function.
Sourcepub fn get_seal<'a, Q>(this: Seal<'a, Self>, key: &Q) -> Option<Seal<'a, V>>
pub fn get_seal<'a, Q>(this: Seal<'a, Self>, key: &Q) -> Option<Seal<'a, V>>
Returns a mutable reference to the value corresponding to the supplied key.
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Returns whether the hash map contains the given key.
Sourcepub fn serialize_from_iter<I, BKU, BVU, KU, VU, S>(
iter: I,
load_factor: (usize, usize),
serializer: &mut S,
) -> Result<HashMapResolver, S::Error>
pub fn serialize_from_iter<I, BKU, BVU, KU, VU, S>( iter: I, load_factor: (usize, usize), serializer: &mut S, ) -> Result<HashMapResolver, S::Error>
Serializes an iterator of key-value pairs as a hash map.
Sourcepub fn resolve_from_len(
len: usize,
load_factor: (usize, usize),
resolver: HashMapResolver,
out: Place<Self>,
)
pub fn resolve_from_len( len: usize, load_factor: (usize, usize), resolver: HashMapResolver, out: Place<Self>, )
Resolves an archived hash map from a given length and parameters.
Trait Implementations§
Source§impl<K, V, H, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedHashMap<K, V, H>where
<__C as Fallible>::Error: Trace,
ArchivedHashTable<Entry<K, V>>: CheckBytes<__C>,
PhantomData<H>: CheckBytes<__C>,
impl<K, V, H, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedHashMap<K, V, H>where
<__C as Fallible>::Error: Trace,
ArchivedHashTable<Entry<K, V>>: CheckBytes<__C>,
PhantomData<H>: CheckBytes<__C>,
Source§impl<K, V, H> Debug for ArchivedHashMap<K, V, H>
impl<K, V, H> Debug for ArchivedHashMap<K, V, H>
Source§impl<K, V, D, S> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<K::Archived, V::Archived>where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
V: Archive,
V::Archived: Deserialize<V, D>,
D: Fallible + ?Sized,
S: Default + BuildHasher,
Available on crate feature std
only.
impl<K, V, D, S> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<K::Archived, V::Archived>where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
V: Archive,
V::Archived: Deserialize<V, D>,
D: Fallible + ?Sized,
S: Default + BuildHasher,
std
only.Source§impl<A, B, K, V, D, S> DeserializeWith<ArchivedHashMap<<A as ArchiveWith<K>>::Archived, <B as ArchiveWith<V>>::Archived>, HashMap<K, V, S>, D> for MapKV<A, B>where
A: ArchiveWith<K> + DeserializeWith<<A as ArchiveWith<K>>::Archived, K, D>,
B: ArchiveWith<V> + DeserializeWith<<B as ArchiveWith<V>>::Archived, V, D>,
K: Ord + Hash + Eq,
D: Fallible + ?Sized,
S: Default + BuildHasher,
Available on crate feature std
only.
impl<A, B, K, V, D, S> DeserializeWith<ArchivedHashMap<<A as ArchiveWith<K>>::Archived, <B as ArchiveWith<V>>::Archived>, HashMap<K, V, S>, D> for MapKV<A, B>where
A: ArchiveWith<K> + DeserializeWith<<A as ArchiveWith<K>>::Archived, K, D>,
B: ArchiveWith<V> + DeserializeWith<<B as ArchiveWith<V>>::Archived, V, D>,
K: Ord + Hash + Eq,
D: Fallible + ?Sized,
S: Default + BuildHasher,
std
only.Source§fn deserialize_with(
field: &ArchivedHashMap<<A as ArchiveWith<K>>::Archived, <B as ArchiveWith<V>>::Archived>,
deserializer: &mut D,
) -> Result<HashMap<K, V, S>, <D as Fallible>::Error>
fn deserialize_with( field: &ArchivedHashMap<<A as ArchiveWith<K>>::Archived, <B as ArchiveWith<V>>::Archived>, deserializer: &mut D, ) -> Result<HashMap<K, V, S>, <D as Fallible>::Error>
F
using the given deserializer.Source§impl<K, Q, V, H> Index<&Q> for ArchivedHashMap<K, V, H>
impl<K, Q, V, H> Index<&Q> for ArchivedHashMap<K, V, H>
Source§impl<K, V, AK, AV> PartialEq<ArchivedHashMap<AK, AV>> for HashMap<K, V>
Available on crate feature std
only.
impl<K, V, AK, AV> PartialEq<ArchivedHashMap<AK, AV>> for HashMap<K, V>
std
only.Source§impl<K, V, AK, AV, S> PartialEq<HashMap<K, V, S>> for ArchivedHashMap<AK, AV>
Available on crate feature std
only.
impl<K, V, AK, AV, S> PartialEq<HashMap<K, V, S>> for ArchivedHashMap<AK, AV>
std
only.Source§impl<K, V, H> PartialEq for ArchivedHashMap<K, V, H>
impl<K, V, H> PartialEq for ArchivedHashMap<K, V, H>
impl<K, V, H> Eq for ArchivedHashMap<K, V, H>
impl<K, V, H> Portable for ArchivedHashMap<K, V, H>
Auto Trait Implementations§
impl<K, V, H> Freeze for ArchivedHashMap<K, V, H>
impl<K, V, H> RefUnwindSafe for ArchivedHashMap<K, V, H>
impl<K, V, H> Send for ArchivedHashMap<K, V, H>
impl<K, V, H> Sync for ArchivedHashMap<K, V, H>
impl<K, V, H = FxHasher64> !Unpin for ArchivedHashMap<K, V, H>
impl<K, V, H> UnwindSafe for ArchivedHashMap<K, V, H>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.