pub unsafe trait RustResource: WasmResource {
    // Required methods
    unsafe fn new(rep: usize) -> u32;
    unsafe fn rep(handle: u32) -> usize;
}
Expand description

A trait which extends WasmResource used for Rust-defined resources, or those exported from this component.

This generally is implemented by generated code, not user-facing code.

Required Methods§

source

unsafe fn new(rep: usize) -> u32

Invokes the [resource-new]... intrinsic.

source

unsafe fn rep(handle: u32) -> usize

Invokes the [resource-rep]... intrinsic.

Object Safety§

This trait is not object safe.

Implementors§