Struct rkyv::collections::hash_set::ArchivedHashSet [−][src]
#[repr(transparent)]pub struct ArchivedHashSet<K>(_);Expand description
An archived HashSet. This is a wrapper around a hash map with the same key and a value of
().
Implementations
Gets the key corresponding to the given key in the hash set.
Returns whether the given key is in the hash set.
Gets an iterator over the keys of the underlying hash map.
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: HashSetResolver,
out: *mut Self
)
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: HashSetResolver,
out: *mut Self
)
Resolves an archived hash set from the given length and parameters.
Safety
lenmust be the number of elements that were serializedposmust be the position ofoutwithin the archiveresolvermust be the result of serializing a hash map
pub unsafe fn serialize_from_iter<'a, KU, S, I>(
iter: I,
serializer: &mut S
) -> Result<HashSetResolver, S::Error> where
KU: 'a + Serialize<S, Archived = K> + Hash + Eq,
S: Serializer + ScratchSpace + ?Sized,
I: ExactSizeIterator<Item = &'a KU>,
pub unsafe fn serialize_from_iter<'a, KU, S, I>(
iter: I,
serializer: &mut S
) -> Result<HashSetResolver, S::Error> where
KU: 'a + Serialize<S, Archived = K> + Hash + Eq,
S: Serializer + ScratchSpace + ?Sized,
I: ExactSizeIterator<Item = &'a KU>,
Serializes an iterator of keys as a hash set.
Safety
The keys returned by the iterator must be unique.
Trait Implementations
impl<K, D, S> Deserialize<HashSet<K, S, Global>, D> for ArchivedHashSet<K::Archived> where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
D: Fallible + ?Sized,
S: Default + BuildHasher,
impl<K, D, S> Deserialize<HashSet<K, S, Global>, D> for ArchivedHashSet<K::Archived> where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
D: Fallible + ?Sized,
S: Default + BuildHasher,
impl<K, D, S> Deserialize<HashSet<K, S>, D> for ArchivedHashSet<K::Archived> where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
D: Fallible + ?Sized,
S: Default + BuildHasher,
impl<K, D, S> Deserialize<HashSet<K, S>, D> for ArchivedHashSet<K::Archived> where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
D: Fallible + ?Sized,
S: Default + BuildHasher,
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<ArchivedHashSet<AK>> for HashSet<K, S>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<ArchivedHashSet<AK>> for HashSet<K, S>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<ArchivedHashSet<AK>> for HashSet<K, S>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<ArchivedHashSet<AK>> for HashSet<K, S>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<HashSet<K, S, Global>> for ArchivedHashSet<AK>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<HashSet<K, S, Global>> for ArchivedHashSet<AK>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<HashSet<K, S>> for ArchivedHashSet<AK>
impl<K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher> PartialEq<HashSet<K, S>> for ArchivedHashSet<AK>
Auto Trait Implementations
impl<K> RefUnwindSafe for ArchivedHashSet<K> where
K: RefUnwindSafe,
impl<K> Send for ArchivedHashSet<K> where
K: Send,
impl<K> Sync for ArchivedHashSet<K> where
K: Sync,
impl<K> !Unpin for ArchivedHashSet<K>
impl<K> UnwindSafe for ArchivedHashSet<K> where
K: 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