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

Method insert

cranelift/entity/src/map.rs:115–117  ·  view source on GitHub ↗

Insert the given key-value pair, returning the old value if it exists.

(&mut self, k: K, v: V)

Source from the content-addressed store, hash-verified

113
114 /// Insert the given key-value pair, returning the old value if it exists.
115 pub fn insert(&mut self, k: K, v: V) -> Option<V> {
116 self.try_insert(k, v).panic_on_oom()
117 }
118
119 /// Like `insert` but returns an error on allocation failure.
120 pub fn try_insert(&mut self, k: K, v: V) -> Result<Option<V>, OutOfMemory> {

Callers 15

armMethod · 0.45
arm_no_fieldsMethod · 0.45
declare_functionMethod · 0.45
runMethod · 0.45
runMethod · 0.45
get_namesFunction · 0.45
declare_functionMethod · 0.45
declare_dataMethod · 0.45
buildMethod · 0.45
set_val_labelMethod · 0.45

Calls 2

panic_on_oomMethod · 0.80
try_insertMethod · 0.45

Tested by 3

runMethod · 0.36
runMethod · 0.36
basicFunction · 0.36