(id: String)
| 131 | } |
| 132 | |
| 133 | pub fn destroy(id: String) { |
| 134 | STORED_VMS.with_borrow_mut(|vms| { |
| 135 | if let Some(stored_vm) = vms.remove(&id) { |
| 136 | // for f in stored_vm.drop_handlers.iter() { |
| 137 | // f(); |
| 138 | // } |
| 139 | // deallocate the VM |
| 140 | drop(stored_vm); |
| 141 | } |
| 142 | }); |
| 143 | } |
| 144 | |
| 145 | pub fn ids() -> Vec<JsValue> { |
| 146 | STORED_VMS.with_borrow(|vms| vms.keys().map(|k| k.into()).collect()) |
nothing calls this directly
no test coverage detected