MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / insert_if_absent

Method insert_if_absent

cranelift/codegen/src/scoped_hash_map.rs:158–163  ·  view source on GitHub ↗

Insert a key-value pair if absent. No-op if already exists.

(&mut self, ctx: &C, key: K, value: V)

Source from the content-addressed store, hash-verified

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.

Callers 2

insert_arbitrary_depthFunction · 0.80
elaborate_blockMethod · 0.80

Calls 2

depthMethod · 0.80

Tested by 1

insert_arbitrary_depthFunction · 0.64