pub trait Object {
    type Key;
    type Element;
    fn get<Q: ?Sized>(&self, k: &Q) -> Option<&Self::Element>
    where
        Self::Key: Borrow<Q> + Hash + Eq,
        Q: Hash + Eq + Ord
;
fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut Self::Element>
    where
        Self::Key: Borrow<Q> + Hash + Eq,
        Q: Hash + Eq + Ord
;
fn insert<K, V>(&mut self, k: K, v: V) -> Option<Self::Element>
    where
        K: Into<Self::Key>,
        V: Into<Self::Element>,
        Self::Key: Hash + Eq
;
fn remove<Q: ?Sized>(&mut self, k: &Q) -> Option<Self::Element>
    where
        Self::Key: Borrow<Q>,
        Q: Hash + Eq + Ord
;
fn iter<'i>(
        &'i self
    ) -> Box<dyn Iterator<Item = (&Self::Key, &Self::Element)> + 'i>;
fn keys<'i>(&'i self) -> Box<dyn Iterator<Item = &Self::Key> + 'i>;
fn values<'i>(&'i self) -> Box<dyn Iterator<Item = &Self::Element> + 'i>;
fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }
Expand description

A JSON Object

Associated Types

The key in the objects

The values in the object

Required methods

Gets a ref to a value based on a key, returns None if the current Value isn’t an Object or doesn’t contain the key it was asked for.

Gets the value of a key as a mutable reference.

Inserts a value

Removes a value from the object

Iterates over the key value paris

Iterates over the keys

Iterates over the values

Number of key/value pairs

Provided methods

Returns if the array is empty

Implementations on Foreign Types

Implementors