pub trait ValueStore {
// Required methods
fn alloc(&mut self, object: HeapObject) -> Value;
fn try_get(&self, value: Value) -> Option<&HeapObject>;
fn try_get_mut(&mut self, value: Value) -> Option<&mut HeapObject>;
}Required Methods§
Sourcefn alloc(&mut self, object: HeapObject) -> Value
fn alloc(&mut self, object: HeapObject) -> Value
Moves object into the store and returns its tagged heap Value.
Sourcefn try_get(&self, value: Value) -> Option<&HeapObject>
fn try_get(&self, value: Value) -> Option<&HeapObject>
Resolves a tagged heap value. None when value does not carry the
heap tag or does not name a live object of this store.
fn try_get_mut(&mut self, value: Value) -> Option<&mut HeapObject>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ValueStore for HandleStore
impl ValueStore for PointerStore
Available on non-
target_family=wasm only.