Struct json_ld_syntax::Entry
source · pub struct Entry<T, M> {
pub key_metadata: M,
pub value: Meta<T, M>,
}
Fields§
§key_metadata: M
§value: Meta<T, M>
Implementations§
source§impl<T, M> Entry<T, M>
impl<T, M> Entry<T, M>
pub fn new(key_metadata: M, value: Meta<T, M>) -> Self
pub fn as_value(&self) -> &Meta<T, M>
pub fn into_value(self) -> Meta<T, M>
pub fn borrow_value(&self) -> Entry<&T, M>where
M: Clone,
pub fn map<U>(self, f: impl Fn(T) -> U) -> Entry<U, M>
pub fn cast<U: From<T>>(self) -> Entry<U, M>
source§impl<'a, T, M> Entry<&'a T, M>
impl<'a, T, M> Entry<&'a T, M>
pub fn into_deref(self) -> Entry<&'a T::Target, M>where
T: Deref,
source§impl<T, M> Entry<T, M>
impl<T, M> Entry<T, M>
pub fn insert_in_json_object(
self,
object: &mut Object<M>,
key: Key
) -> Option<RemovedByInsertion<'_, M>>where
T: IntoJsonMeta<M>,
Methods from Deref<Target = Meta<T, M>>§
sourcepub fn location_mut(&mut self) -> &mut Location<F, S>
pub fn location_mut(&mut self) -> &mut Location<F, S>
Returns a mutable reference to the value’s location.
sourcepub fn cloned_file(&self) -> Meta<T, Location<F, S>>where
T: Clone,
pub fn cloned_file(&self) -> Meta<T, Location<F, S>>where
T: Clone,
Clones the value and the borrowed file to return a new Loc<T, F>
.
sourcepub fn metadata_mut(&mut self) -> &mut M
pub fn metadata_mut(&mut self) -> &mut M
Returns a mutable reference to the value’s metadata.
sourcepub fn borrow_value(&self) -> Meta<&T, M>where
M: Clone,
pub fn borrow_value(&self) -> Meta<&T, M>where
M: Clone,
Borrows the value and clones the metadata.
sourcepub fn borrow_metadata(&self) -> Meta<T, &M>where
T: Clone,
pub fn borrow_metadata(&self) -> Meta<T, &M>where
T: Clone,
Borrows the file and clones the value.
sourcepub fn cloned_value(&self) -> Meta<T, M>where
M: Clone,
pub fn cloned_value(&self) -> Meta<T, M>where
M: Clone,
Clones the borrowed value and the file to return a new Meta<T, F>
.
pub fn cloned_metadata(&self) -> Meta<T, M>where
T: Clone,
Trait Implementations§
source§impl<T: Ord, M: Ord> Ord for Entry<T, M>
impl<T: Ord, M: Ord> Ord for Entry<T, M>
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<T: PartialEq, M: PartialEq> PartialEq<Entry<T, M>> for Entry<T, M>
impl<T: PartialEq, M: PartialEq> PartialEq<Entry<T, M>> for Entry<T, M>
source§impl<T: PartialOrd, M: PartialOrd> PartialOrd<Entry<T, M>> for Entry<T, M>
impl<T: PartialOrd, M: PartialOrd> PartialOrd<Entry<T, M>> for Entry<T, 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<T: StrippedHash, M> StrippedHash for Entry<T, M>
impl<T: StrippedHash, M> StrippedHash for Entry<T, M>
fn stripped_hash<H: Hasher>(&self, state: &mut H)
source§impl<T: StrippedPartialEq<__T>, M, __T, __M> StrippedPartialEq<Entry<__T, __M>> for Entry<T, M>
impl<T: StrippedPartialEq<__T>, M, __T, __M> StrippedPartialEq<Entry<__T, __M>> for Entry<T, M>
fn stripped_eq(&self, other: &Entry<__T, __M>) -> bool
impl<T: Copy, M: Copy> Copy for Entry<T, M>
impl<T: Eq, M: Eq> Eq for Entry<T, M>
impl<T: StrippedEq, M> StrippedEq for Entry<T, M>
impl<T, M> StructuralEq for Entry<T, M>
impl<T, M> StructuralPartialEq for Entry<T, M>
Auto Trait Implementations§
impl<T, M> RefUnwindSafe for Entry<T, M>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for Entry<T, M>where
M: Send,
T: Send,
impl<T, M> Sync for Entry<T, M>where
M: Sync,
T: Sync,
impl<T, M> Unpin for Entry<T, M>where
M: Unpin,
T: Unpin,
impl<T, M> UnwindSafe for Entry<T, M>where
M: UnwindSafe,
T: 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.