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
sourceimpl<K: Archive, V: Archive> Archive for Entry<&K, &V>
impl<K: Archive, V: Archive> Archive for Entry<&K, &V>
type Archived = Entry<<K as Archive>::Archived, <V as Archive>::Archived>
type Archived = Entry<<K as Archive>::Archived, <V as Archive>::Archived>
The archived representation of this type. Read more
sourceimpl<K, V, UK, UV> PartialEq<Entry<UK, UV>> for Entry<K, V>where
K: PartialEq<UK>,
V: PartialEq<UV>,
impl<K, V, UK, UV> PartialEq<Entry<UK, UV>> for Entry<K, V>where
K: PartialEq<UK>,
V: PartialEq<UV>,
impl<K: Eq, V: Eq> Eq for Entry<K, V>
impl<K, V> StructuralEq for Entry<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Entry<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Entry<K, V>where
K: Send,
V: Send,
impl<K, V> Sync for Entry<K, V>where
K: Sync,
V: Sync,
impl<K, V> Unpin for Entry<K, V>where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for Entry<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive
, it may be unsized. Read moretype MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
sourceunsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
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
sourceunsafe 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 moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more