(&mut self, ns: &S::Namespace, k: &K, v: &V)
| 182 | S::Repr: Hash + Eq, |
| 183 | { |
| 184 | fn put<K, V>(&mut self, ns: &S::Namespace, k: &K, v: &V) -> KVResult<()> |
| 185 | where |
| 186 | S: Encode<K> + Encode<V>, |
| 187 | { |
| 188 | let mut m = self.data.get(ns).cloned().unwrap_or_default(); |
| 189 | let kr = S::to_repr(k)?; |
| 190 | let vr = S::to_repr(v)?; |
| 191 | m.insert(kr.into_owned(), Arc::new(vr.into_owned())); |
| 192 | self.data.insert(ns.clone(), m); |
| 193 | Ok(()) |
| 194 | } |
| 195 | |
| 196 | fn delete<K>(&mut self, ns: &S::Namespace, k: &K) -> KVResult<()> |
| 197 | where |