Struct rkyv::collections::util::Entry [−][src]
pub struct Entry<K, V> {
pub key: K,
pub value: V,
}
Expand description
A simple key-value pair.
This is typically used by associative containers that store keys and values together.
Fields
key: K
The key of the pair.
value: V
The value of the pair.
Trait Implementations
The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type. Read more
impl<K, V, C> CheckBytes<C> for Entry<K, V> where
K: CheckBytes<C>,
V: CheckBytes<C>,
C: ArchiveContext + ?Sized,
impl<K, V, C> CheckBytes<C> for Entry<K, V> where
K: CheckBytes<C>,
V: CheckBytes<C>,
C: ArchiveContext + ?Sized,
type Error = ArchivedHashMapEntryError<K::Error, V::Error>
type Error = ArchivedHashMapEntryError<K::Error, V::Error>
The error that may result from checking the type.
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Entry<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> UnwindSafe for Entry<K, V> where
K: UnwindSafe,
V: 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.
The archived counterpart of this type. Unlike Archive
, it may be unsized. Read more
type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
pub unsafe fn resolve_metadata(
&Self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
pub unsafe fn resolve_metadata(
&Self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
Creates the archived version of the metadata for this value at the given position and writes it to the given output. Read more
unsafe fn resolve_unsized(
&self,
from: usize,
to: usize,
resolver: Self::MetadataResolver,
out: *mut RelPtr<Self::Archived>
)
unsafe fn resolve_unsized(
&self,
from: usize,
to: usize,
resolver: Self::MetadataResolver,
out: *mut RelPtr<Self::Archived>
)
Resolves a relative pointer to this value with the given from
and to
and writes it to
the given output. Read more
Mutably borrows from an owned value. Read more