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

Method get

crates/wasmtime/src/runtime/vm/instance.rs:1836–1842  ·  view source on GitHub ↗

Gets the raw underlying `&Instance` from this handle.

(&self)

Source from the content-addressed store, hash-verified

1834
1835 /// Gets the raw underlying `&Instance` from this handle.
1836 pub fn get(&self) -> &T {
1837 // SAFETY: this is an owned instance handle that retains exclusive
1838 // ownership of the `Instance` inside. With `&self` given we know
1839 // this pointer is valid valid and the returned lifetime is connected
1840 // to `self` so that should also be valid.
1841 unsafe { self.instance.as_non_null().as_ref() }
1842 }
1843
1844 /// Same as [`Self::get`] except for mutability.
1845 pub fn get_mut(&mut self) -> Pin<&mut T> {

Callers 15

compute_handlerFunction · 0.45
into_abiMethod · 0.45
prevMethod · 0.45
swapMethod · 0.45
unwindMethod · 0.45
entry_trap_handlerMethod · 0.45
set_jit_trapMethod · 0.45
entry_trap_handlerFunction · 0.45
dropMethod · 0.45
externref_host_dataMethod · 0.45
alloc_rawMethod · 0.45

Calls 2

as_refMethod · 0.45
as_non_nullMethod · 0.45

Tested by

no test coverage detected