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>
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(_: &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> ArchiveUnsized for T where
T: Archive,
impl<T> ArchiveUnsized for T where
T: Archive,
type Archived = T::Archived
type Archived = T::Archived
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
sourceunsafe fn resolve_metadata(
&self,
_: usize,
_: Self::MetadataResolver,
_: *mut ArchivedMetadata<Self>
)
unsafe fn resolve_metadata(
&self,
_: usize,
_: Self::MetadataResolver,
_: *mut ArchivedMetadata<Self>
)
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 more
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