Lines Matching refs:key
87 /// Checks whether the specified key exists in the Object.
99 pub fn contains_key(&self, key: &str) -> bool {
100 self.inner.contains_key(key)
103 /// Inserts the specified key and value into the Object, and replaces the value if the key already exists in the Object.
114 pub fn insert(&mut self, key: String, value: JsonValue) {
115 self.inner.insert(key, value);
130 pub fn remove(&mut self, key: &str) -> Option<JsonValue> {
131 self.inner.remove(key)
160 /// Gets a common reference to the element in Object with the specified key.
172 pub fn get(&self, key: &str) -> Option<&JsonValue> {
173 self.inner.get(key)
176 /// Gets a mutable reference to the element in Object with the specified key.
188 pub fn get_mut(&mut self, key: &str) -> Option<&mut JsonValue> {
189 self.inner.get_mut(key)
196 for (n, (key, value)) in self.inner.iter().enumerate() {
200 write!(f, "\"{key}\":{value}")?;