Struct json_syntax::object::Entry
source · [−]Expand description
Object entry.
Fields
key: Meta<Key, M>
value: MetaValue<M>
Implementations
sourceimpl<M> Entry<M>
impl<M> Entry<M>
pub fn new(key: Meta<Key, M>, value: MetaValue<M>) -> Self
pub fn as_key(&self) -> &Meta<Key, M>
pub fn as_value(&self) -> &MetaValue<M>
pub fn into_key(self) -> Meta<Key, M>
pub fn into_value(self) -> MetaValue<M>
pub fn stripped_key(&self) -> &Key
pub fn stripped_value(&self) -> &Value<M>
pub fn into_stripped_key(self) -> Key
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<Key, M>, &MetaValue<M>)
Trait Implementations
sourceimpl<M> Extend<Entry<M>> for Object<M>
impl<M> Extend<Entry<M>> for Object<M>
sourcefn extend<I: IntoIterator<Item = Entry<M>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Entry<M>>>(&mut self, iter: I)
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>
sourcefn from_iter<I: IntoIterator<Item = Entry<M>>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Entry<M>>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl<M: Ord> Ord for Entry<M>
impl<M: Ord> Ord for Entry<M>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<M: PartialEq> PartialEq<Entry<M>> for Entry<M>
impl<M: PartialEq> PartialEq<Entry<M>> for Entry<M>
sourceimpl<M: PartialOrd> PartialOrd<Entry<M>> for Entry<M>
impl<M: PartialOrd> PartialOrd<Entry<M>> for Entry<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: Hasher>(&self, state: &mut H)
sourceimpl<M> StrippedOrd for Entry<M>
impl<M> StrippedOrd for Entry<M>
fn stripped_cmp(&self, other: &Self) -> Ordering
sourceimpl<M> StrippedPartialEq<Entry<M>> for Entry<M>
impl<M> StrippedPartialEq<Entry<M>> for Entry<M>
fn stripped_eq(&self, other: &Self) -> bool
sourceimpl<M> StrippedPartialOrd<Entry<M>> for Entry<M>
impl<M> StrippedPartialOrd<Entry<M>> for Entry<M>
fn stripped_partial_cmp(&self, other: &Self) -> Option<Ordering>
impl<M: Eq> Eq for Entry<M>
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