Struct json_ld_syntax::object::Entry
source · Expand description
Object entry.
Fields
key: Meta<SmallString<[u8; 16]>, M>
value: Meta<Value<M>, M>
Implementations
sourceimpl<M> Entry<M>
impl<M> Entry<M>
pub fn new(
key: Meta<SmallString<[u8; 16]>, M>,
value: Meta<Value<M>, M>
) -> Entry<M>
pub fn as_key(&self) -> &Meta<SmallString<[u8; 16]>, M>
pub fn as_value(&self) -> &Meta<Value<M>, M>
pub fn into_key(self) -> Meta<SmallString<[u8; 16]>, M>
pub fn into_value(self) -> Meta<Value<M>, M>
pub fn stripped_key(&self) -> &SmallString<[u8; 16]>
pub fn stripped_value(&self) -> &Value<M>
pub fn into_stripped_key(self) -> SmallString<[u8; 16]>
pub fn into_stripped_value(self) -> Value<M>
pub fn key_metadata(&self) -> &M
pub fn value_metadata(&self) -> &M
pub fn into_key_metadata(self) -> M
pub fn into_value_metadata(self) -> M
pub fn map_metadata<N>(self, f: impl FnMut(M) -> N) -> Entry<N>
pub fn try_map_metadata<N, E>(
self,
f: impl FnMut(M) -> Result<N, E>
) -> Result<Entry<N>, E>
pub fn as_pair(&self) -> (&Meta<SmallString<[u8; 16]>, M>, &Meta<Value<M>, M>)
Trait Implementations
sourceimpl<M> Extend<Entry<M>> for Object<M>
impl<M> Extend<Entry<M>> for Object<M>
sourcefn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Entry<M>>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Entry<M>>,
Extends a collection with the contents of an iterator. Read more
sourcefn 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.
sourcefn 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
sourceimpl<M> FromIterator<Entry<M>> for Object<M>
impl<M> FromIterator<Entry<M>> for Object<M>
sourceimpl<M> Ord for Entry<M>where
M: Ord,
impl<M> Ord for Entry<M>where
M: Ord,
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<M> PartialEq<Entry<M>> for Entry<M>where
M: PartialEq<M>,
impl<M> PartialEq<Entry<M>> for Entry<M>where
M: PartialEq<M>,
sourceimpl<M> PartialOrd<Entry<M>> for Entry<M>where
M: PartialOrd<M>,
impl<M> PartialOrd<Entry<M>> for Entry<M>where
M: PartialOrd<M>,
sourcefn partial_cmp(&self, other: &Entry<M>) -> Option<Ordering>
fn partial_cmp(&self, other: &Entry<M>) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl<M> StrippedHash for Entry<M>
impl<M> StrippedHash for Entry<M>
fn stripped_hash<H>(&self, state: &mut H)where
H: Hasher,
sourceimpl<M> StrippedOrd for Entry<M>
impl<M> StrippedOrd for Entry<M>
fn stripped_cmp(&self, other: &Entry<M>) -> Ordering
sourceimpl<M, __M> StrippedPartialEq<Entry<__M>> for Entry<M>
impl<M, __M> StrippedPartialEq<Entry<__M>> for Entry<M>
fn stripped_eq(&self, other: &Entry<__M>) -> bool
sourceimpl<M, __M> StrippedPartialOrd<Entry<__M>> for Entry<M>
impl<M, __M> StrippedPartialOrd<Entry<__M>> for Entry<M>
fn stripped_partial_cmp(&self, other: &Entry<__M>) -> Option<Ordering>
impl<M> Eq for Entry<M>where
M: Eq,
impl<M> StrippedEq for Entry<M>
impl<M> StructuralEq for Entry<M>
impl<M> StructuralPartialEq for Entry<M>
Auto Trait Implementations
impl<M> RefUnwindSafe for Entry<M>where
M: RefUnwindSafe,
impl<M> Send for Entry<M>where
M: Send,
impl<M> Sync for Entry<M>where
M: Sync,
impl<M> Unpin for Entry<M>where
M: Unpin,
impl<M> UnwindSafe for Entry<M>where
M: UnwindSafe,
Blanket Implementations
sourceimpl<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
sourceimpl<T> BorrowStripped for T
impl<T> BorrowStripped for T
sourceimpl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.