Skip to main content

ValueStore

Trait ValueStore 

Source
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§

Source

fn alloc(&mut self, object: HeapObject) -> Value

Moves object into the store and returns its tagged heap Value.

Source

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.

Source

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§

Source§

impl ValueStore for HandleStore

Source§

impl ValueStore for PointerStore

Available on non-target_family=wasm only.