pub trait Resource {
// Required methods
fn id(&self) -> u64;
unsafe fn from_id(id: u64) -> Self;
}
Expand description
Implemented for all resources held by the VM.
Returns process local resource ID.
Turns process local resource ID into resource handle.
Extra care needs to be taken when balancing host side resources. It’s
easy to create an invalid resource reference.