Struct json_ld_syntax::object::Entry
source · pub struct Entry<K = SmallString<[u8; 16]>, 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) -> Entry<K, V>
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>(&mut self, iter: I)where
I: IntoIterator<Item = Entry>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Entry>,
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, V> Ord for Entry<K, V>
impl<K, V> 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, V> PartialEq for Entry<K, V>
impl<K, V> PartialEq for Entry<K, V>
source§impl<K, V> PartialOrd for Entry<K, V>where
K: PartialOrd,
V: PartialOrd,
impl<K, V> PartialOrd for Entry<K, V>where
K: PartialOrd,
V: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<K, V> Copy for Entry<K, V>
impl<K, V> 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
source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.