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

Method push

cranelift/entity/src/primary.rs:139–143  ·  view source on GitHub ↗

Append `v` to the mapping, assigning a new key which is returned.

(&mut self, v: V)

Source from the content-addressed store, hash-verified

137
138 /// Append `v` to the mapping, assigning a new key which is returned.
139 pub fn push(&mut self, v: V) -> K {
140 let k = self.next_key();
141 self.elems.push(v);
142 k
143 }
144
145 /// Returns the last element that was inserted in the map.
146 pub fn last(&self) -> Option<(K, &V)> {

Callers 10

pushFunction · 0.45
iterFunction · 0.45
iter_revFunction · 0.45
keysFunction · 0.45
keys_revFunction · 0.45
valuesFunction · 0.45
values_revFunction · 0.45
from_iterFunction · 0.45
from_vecFunction · 0.45
get_many_mutFunction · 0.45

Calls 1

next_keyMethod · 0.45

Tested by 10

pushFunction · 0.36
iterFunction · 0.36
iter_revFunction · 0.36
keysFunction · 0.36
keys_revFunction · 0.36
valuesFunction · 0.36
values_revFunction · 0.36
from_iterFunction · 0.36
from_vecFunction · 0.36
get_many_mutFunction · 0.36