MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / get_global

Method get_global

aiscript-vm/src/vm/extra.rs:14–19  ·  view source on GitHub ↗
(&mut self, name: &'static str)

Source from the content-addressed store, hash-verified

12
13impl Vm {
14 pub fn get_global(&mut self, name: &'static str) -> Option<ReturnValue> {
15 self.arena.mutate_root(|_mc, state| {
16 let name = state.intern_static(name);
17 state.globals.get(&name).copied().map(ReturnValue::from)
18 })
19 }
20
21 pub fn register_extra_native_functions(&mut self) {
22 self.arena.mutate_root(|_mc, state| {

Callers

nothing calls this directly

Calls 3

mutate_rootMethod · 0.80
intern_staticMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected