pub trait Resource {
    fn id(&self) -> u64;
    unsafe fn from_id(id: u64) -> Self;
}
Expand description

Implemented for all resources held by the VM.

Required Methods

Returns process local resource ID.

Turns process local resource ID into resource handle.

Safety

Extra care needs to be taken when balancing host side resources. It’s easy to create an invalid resource reference.

Implementors