Insert a key-value pair if absent. No-op if already exists.
(&mut self, ctx: &C, key: K, value: V)
| 156 | |
| 157 | /// Insert a key-value pair if absent. No-op if already exists. |
| 158 | pub fn insert_if_absent<C>(&mut self, ctx: &C, key: K, value: V) |
| 159 | where |
| 160 | C: CtxEq<K, K> + CtxHash<K>, |
| 161 | { |
| 162 | self.insert_if_absent_with_depth(ctx, key, value, self.depth()); |
| 163 | } |
| 164 | |
| 165 | /// Insert a key-value pair if absent, using the given depth for |
| 166 | /// the insertion. No-op if already exists. |