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

Method push

crates/core/src/alloc/vec.rs:155–159  ·  view source on GitHub ↗

Same as [`std::vec::Vec::push`] but returns an error on allocation failure.

(&mut self, value: T)

Source from the content-addressed store, hash-verified

153 /// Same as [`std::vec::Vec::push`] but returns an error on allocation
154 /// failure.
155 pub fn push(&mut self, value: T) -> Result<(), OutOfMemory> {
156 self.reserve(1)?;
157 self.inner.push(value);
158 Ok(())
159 }
160
161 /// Same as [`std::vec::Vec::pop`].
162 pub fn pop(&mut self) -> Option<T> {

Callers 15

enter_dirMethod · 0.45
add_debuggeeFunction · 0.45
all_modulesMethod · 0.45
all_instancesMethod · 0.45
exit_framesMethod · 0.45
result_to_eventFunction · 0.45
get_moduleMethod · 0.45
get_memoryMethod · 0.45
get_globalMethod · 0.45
get_tableMethod · 0.45
get_funcMethod · 0.45

Calls 2

OkFunction · 0.85
reserveMethod · 0.45

Tested by 15

process_expandedFunction · 0.36
test_into_boxed_sliceFunction · 0.36
expandFunction · 0.36
test_round_trip_directFunction · 0.36
poll_consumeMethod · 0.36
test_async_short_readsFunction · 0.36
test_run_boolFunction · 0.36
test_round_trip_manyFunction · 0.36
test_run_with_countFunction · 0.36
test_round_tripFunction · 0.36
runMethod · 0.36