[−][src]Trait simd_json::prelude::Object
Prelude to include needed traits A JSON Object
Associated Types
Loading content...Required methods
#[must_use]pub 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,
[src]
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq,
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.
#[must_use]pub 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,
[src]
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq,
Gets the value of a key as a mutable reference.
#[must_use]pub 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,
[src]
K: Into<Self::Key>,
V: Into<Self::Element>,
Self::Key: Hash,
Self::Key: Eq,
Inserts a value
#[must_use]pub fn remove<Q>(&mut self, k: &Q) -> Option<Self::Element> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
[src]
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Removes a value from the object
#[must_use]pub fn iter(
&'i self
) -> Box<dyn Iterator<Item = (&'i Self::Key, &'i Self::Element)> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = (&'i Self::Key, &'i Self::Element)> + 'i, Global>
Iterates over the key value paris
#[must_use]pub fn keys(&'i self) -> Box<dyn Iterator<Item = &'i Self::Key> + 'i, Global>
[src]
Iterates over the keys
#[must_use]pub fn values(
&'i self
) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i, Global>
Iterates over the values
#[must_use]pub fn len(&self) -> usize
[src]
Number of key/value pairs
Provided methods
Loading content...Implementations on Foreign Types
impl<MapK, MapE> Object for HashMap<MapK, MapE, RandomState> where
MapK: Hash + Eq,
[src]
MapK: Hash + Eq,
type Key = MapK
type Element = MapE
pub fn get<Q>(
&self,
k: &Q
) -> Option<&<HashMap<MapK, MapE, RandomState> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
[src]
&self,
k: &Q
) -> Option<&<HashMap<MapK, MapE, RandomState> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
pub fn get_mut<Q>(
&mut self,
k: &Q
) -> Option<&mut <HashMap<MapK, MapE, RandomState> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
[src]
&mut self,
k: &Q
) -> Option<&mut <HashMap<MapK, MapE, RandomState> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
pub fn insert<K, V>(
&mut self,
k: K,
v: V
) -> Option<<HashMap<MapK, MapE, RandomState> as Object>::Element> where
K: Into<<HashMap<MapK, MapE, RandomState> as Object>::Key>,
V: Into<<HashMap<MapK, MapE, RandomState> as Object>::Element>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
[src]
&mut self,
k: K,
v: V
) -> Option<<HashMap<MapK, MapE, RandomState> as Object>::Element> where
K: Into<<HashMap<MapK, MapE, RandomState> as Object>::Key>,
V: Into<<HashMap<MapK, MapE, RandomState> as Object>::Element>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
pub fn remove<Q>(
&mut self,
k: &Q
) -> Option<<HashMap<MapK, MapE, RandomState> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
[src]
&mut self,
k: &Q
) -> Option<<HashMap<MapK, MapE, RandomState> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Hash,
<HashMap<MapK, MapE, RandomState> as Object>::Key: Eq,
pub fn iter(
&'i self
) -> Box<dyn Iterator<Item = (&'i <HashMap<MapK, MapE, RandomState> as Object>::Key, &'i <HashMap<MapK, MapE, RandomState> as Object>::Element)> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = (&'i <HashMap<MapK, MapE, RandomState> as Object>::Key, &'i <HashMap<MapK, MapE, RandomState> as Object>::Element)> + 'i, Global>
pub fn keys(
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, RandomState> as Object>::Key> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, RandomState> as Object>::Key> + 'i, Global>
pub fn values(
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, RandomState> as Object>::Element> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, RandomState> as Object>::Element> + 'i, Global>
pub fn len(&self) -> usize
[src]
impl<MapK, MapE, S> Object for HashMap<MapK, MapE, S> where
MapK: Hash + Eq,
S: BuildHasher,
[src]
MapK: Hash + Eq,
S: BuildHasher,
type Key = MapK
type Element = MapE
pub fn get<Q>(
&self,
k: &Q
) -> Option<&<HashMap<MapK, MapE, S> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, S> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
[src]
&self,
k: &Q
) -> Option<&<HashMap<MapK, MapE, S> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, S> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
pub fn get_mut<Q>(
&mut self,
k: &Q
) -> Option<&mut <HashMap<MapK, MapE, S> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, S> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
[src]
&mut self,
k: &Q
) -> Option<&mut <HashMap<MapK, MapE, S> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, S> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
pub fn insert<K, V>(
&mut self,
k: K,
v: V
) -> Option<<HashMap<MapK, MapE, S> as Object>::Element> where
K: Into<<HashMap<MapK, MapE, S> as Object>::Key>,
V: Into<<HashMap<MapK, MapE, S> as Object>::Element>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
[src]
&mut self,
k: K,
v: V
) -> Option<<HashMap<MapK, MapE, S> as Object>::Element> where
K: Into<<HashMap<MapK, MapE, S> as Object>::Key>,
V: Into<<HashMap<MapK, MapE, S> as Object>::Element>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
pub fn remove<Q>(
&mut self,
k: &Q
) -> Option<<HashMap<MapK, MapE, S> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, S> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
[src]
&mut self,
k: &Q
) -> Option<<HashMap<MapK, MapE, S> as Object>::Element> where
Q: Hash + Eq + Ord + ?Sized,
<HashMap<MapK, MapE, S> as Object>::Key: Borrow<Q>,
<HashMap<MapK, MapE, S> as Object>::Key: Hash,
<HashMap<MapK, MapE, S> as Object>::Key: Eq,
pub fn iter(
&'i self
) -> Box<dyn Iterator<Item = (&'i <HashMap<MapK, MapE, S> as Object>::Key, &'i <HashMap<MapK, MapE, S> as Object>::Element)> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = (&'i <HashMap<MapK, MapE, S> as Object>::Key, &'i <HashMap<MapK, MapE, S> as Object>::Element)> + 'i, Global>
pub fn keys(
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, S> as Object>::Key> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, S> as Object>::Key> + 'i, Global>
pub fn values(
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, S> as Object>::Element> + 'i, Global>
[src]
&'i self
) -> Box<dyn Iterator<Item = &'i <HashMap<MapK, MapE, S> as Object>::Element> + 'i, Global>