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

Method defined_globals

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

Get the globals defined in this instance (not imported).

(
        &self,
        store: StoreId,
    )

Source from the content-addressed store, hash-verified

526
527 /// Get the globals defined in this instance (not imported).
528 pub fn defined_globals(
529 &self,
530 store: StoreId,
531 ) -> impl ExactSizeIterator<Item = (DefinedGlobalIndex, crate::Global)> + '_ {
532 let module = self.env_module();
533 self.all_globals(store)
534 .skip(module.num_imported_globals)
535 .map(move |(i, global)| (module.defined_global_index(i).unwrap(), global))
536 }
537
538 /// Return a pointer to the interrupts structure
539 #[inline]

Callers

nothing calls this directly

Calls 6

defined_global_indexMethod · 0.80
env_moduleMethod · 0.45
mapMethod · 0.45
skipMethod · 0.45
all_globalsMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected