pub trait Object {
    type Key;
    type Element;

    fn get<Q>(&self, k: &Q) -> Option<&Self::Element>
    where
        Q: Hash + Eq + Ord + ?Sized,
        Self::Key: Borrow<Q>,
        Self::Key: Hash,
        Self::Key: Eq
; fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Self::Element>
    where
        Q: Hash + Eq + Ord + ?Sized,
        Self::Key: Borrow<Q>,
        Self::Key: Hash,
        Self::Key: Eq
; 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,
        Self::Key: Eq
; fn remove<Q>(&mut self, k: &Q) -> Option<Self::Element>
    where
        Q: Hash + Eq + Ord + ?Sized,
        Self::Key: Borrow<Q>
; fn iter(
        &'i self
    ) -> Box<dyn Iterator<Item = (&'i Self::Key, &'i Self::Element)> + 'i, Global>; fn keys(&'i self) -> Box<dyn Iterator<Item = &'i Self::Key> + 'i, Global>; fn values(
        &'i self
    ) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i, Global>; fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }
Expand description

A JSON Object

Required 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