MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_vm_id

Function get_vm_id

crates/wasm/src/vm_class.rs:88–92  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

86}
87
88pub fn get_vm_id(vm: &VirtualMachine) -> &str {
89 vm.wasm_id
90 .as_ref()
91 .expect("VirtualMachine inside of WASM crate should have wasm_id set")
92}
93pub(crate) fn stored_vm_from_wasm(wasm_vm: &WASMVirtualMachine) -> Rc<StoredVirtualMachine> {
94 STORED_VMS.with_borrow(|vms| {
95 vms.get(&wasm_vm.id)

Callers 1

weak_vmFunction · 0.85

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected