Struct rkyv::collections::hash_index::ArchivedHashIndex
source · [−]pub struct ArchivedHashIndex { /* private fields */ }
Expand description
An archived hash index.
Implementations
sourceimpl ArchivedHashIndex
impl ArchivedHashIndex
sourcepub fn hasher(&self) -> HashBuilder
pub fn hasher(&self) -> HashBuilder
Gets the hasher for this hash index. The hasher for all archived hash indexes is the same for reproducibility.
sourcepub fn index<K: Hash + ?Sized>(&self, k: &K) -> Option<usize>
pub fn index<K: Hash + ?Sized>(&self, k: &K) -> Option<usize>
Returns the index where a key may be located in the hash index.
The hash index does not have access to the keys used to build it, so the key at the returned index must be checked for equality.
sourcepub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: HashIndexResolver,
out: *mut Self
)
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: HashIndexResolver,
out: *mut Self
)
Resolves an archived hash index from a given length and parameters.
Safety
len
must be the number of elements in the hash indexpos
must be the position ofout
within the archiveresolver
must be the result of building and serializing a hash index
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ArchivedHashIndex
impl Send for ArchivedHashIndex
impl Sync for ArchivedHashIndex
impl !Unpin for ArchivedHashIndex
impl UnwindSafe for ArchivedHashIndex
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more