Struct json_syntax::object::Entry
source · pub struct Entry {
pub key: Key,
pub value: Value,
}
Expand description
Object entry.
Fields§
§key: Key
§value: Value
Implementations§
source§impl Entry
impl Entry
pub fn new(key: Key, value: Value) -> Self
pub fn get_fragment(&self, index: usize) -> Result<FragmentRef<'_>, usize>
pub fn as_key(&self) -> &Key
pub fn as_value(&self) -> &Value
pub fn into_key(self) -> Key
pub fn into_value(self) -> Value
pub fn as_pair(&self) -> (&Key, &Value)
pub fn into_pair(self) -> (Key, Value)
Trait Implementations§
source§impl Extend<Entry> for Object
impl Extend<Entry> for Object
source§fn extend<I: IntoIterator<Item = Entry>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Entry>>(&mut self, iter: I)
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 Ord for Entry
impl Ord for Entry
source§impl PartialEq for Entry
impl PartialEq for Entry
source§impl PartialOrd for Entry
impl PartialOrd for Entry
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 Eq for Entry
impl StructuralEq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
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