Struct json_ld_syntax::object::Entry
source · Expand description
Object entry.
Fields§
§key: Meta<SmallString<[u8; 16]>, M>
§value: Meta<Value<M>, M>
Implementations§
source§impl<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§
source§impl<M> Extend<Entry<M>> for Object<M>
impl<M> Extend<Entry<M>> for Object<M>
source§fn 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
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<M> FromIterator<Entry<M>> for Object<M>
impl<M> FromIterator<Entry<M>> for Object<M>
source§impl<M> Ord for Entry<M>where
M: Ord,
impl<M> Ord for Entry<M>where
M: Ord,
source§impl<M> PartialEq<Entry<M>> for Entry<M>where
M: PartialEq<M>,
impl<M> PartialEq<Entry<M>> for Entry<M>where
M: PartialEq<M>,
source§impl<M> PartialOrd<Entry<M>> for Entry<M>where
M: PartialOrd<M>,
impl<M> PartialOrd<Entry<M>> for Entry<M>where
M: PartialOrd<M>,
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 moresource§impl<M> StrippedHash for Entry<M>
impl<M> StrippedHash for Entry<M>
fn stripped_hash<H>(&self, state: &mut H)where
H: Hasher,
source§impl<M> StrippedOrd for Entry<M>
impl<M> StrippedOrd for Entry<M>
fn stripped_cmp(&self, other: &Entry<M>) -> Ordering
source§impl<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
source§impl<M, __M> StrippedPartialOrd<Entry<__M>> for Entry<M>
impl<M, __M> StrippedPartialOrd<Entry<__M>> for Entry<M>
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§
source§impl<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
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.