pub struct Entry<K = Key, V = Value> {
pub key: K,
pub value: V,
}
Expand description
Object entry.
Fields§
§key: K
§value: V
Implementations§
Source§impl<K, V> Entry<K, V>
impl<K, V> Entry<K, V>
pub fn new(key: K, value: V) -> Self
pub fn as_key(&self) -> &K
pub fn as_value(&self) -> &V
pub fn into_key(self) -> K
pub fn into_value(self) -> V
pub fn as_pair(&self) -> (&K, &V)
pub fn into_pair(self) -> (K, V)
pub fn as_ref(&self) -> Entry<&K, &V>
pub fn into_mapped( self, key_offset: usize, value_offset: usize, ) -> Entry<Mapped<K>, Mapped<V>>
Source§impl Entry
impl Entry
pub fn get_fragment(&self, index: usize) -> Result<FragmentRef<'_>, usize>
Trait Implementations§
Source§impl Extend<Entry> for Object
impl Extend<Entry> for Object
Source§fn extend<I: IntoIterator<Item = Entry>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Entry>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<Entry> for Object
impl FromIterator<Entry> for Object
Source§impl<K: Ord, V: Ord> Ord for Entry<K, V>
impl<K: Ord, V: Ord> Ord for Entry<K, V>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<K: PartialOrd, V: PartialOrd> PartialOrd for Entry<K, V>
impl<K: PartialOrd, V: PartialOrd> PartialOrd for Entry<K, V>
impl<K: Copy, V: Copy> Copy for Entry<K, V>
impl<K: Eq, V: Eq> Eq for Entry<K, V>
impl<K, V> StructuralPartialEq for Entry<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for Entry<K, V>
impl<K, V> RefUnwindSafe for Entry<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Entry<K, V>
impl<K, V> Sync for Entry<K, V>
impl<K, V> Unpin for Entry<K, V>
impl<K, V> UnwindSafe for Entry<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more