pub struct Resource<T> { /* private fields */ }Expand description
Host resource exposed to WASM.
Internally, a resource is just an index into the externrefs table; thus, it is completely
valid to store Resources on heap (in a Vec, thread-local storage, etc.). The type param
can be used for type safety.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Resource<T>
impl<T> Send for Resource<T>
impl<T> Sync for Resource<T>
impl<T> Unpin for Resource<T>
impl<T> UnwindSafe for Resource<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more