Struct wasmtime_c_api::StoreRef
source · pub struct StoreRef { /* private fields */ }
Expand description
This representation of a Store
is used to implement the wasm.h
API.
This is stored alongside Func
and such for wasm.h
so each object is
independently owned. The usage of Arc
here is mostly to just get it to be
safe to drop across multiple threads, but otherwise acquiring the context
values from this struct is considered unsafe due to it being unknown how the
aliasing is working on the C side of things.
The aliasing requirements are documented in the C API wasm.h
itself (at
least Wasmtime’s implementation).
Implementations§
source§impl StoreRef
impl StoreRef
pub unsafe fn context(&self) -> StoreContext<'_, ()>
pub unsafe fn context_mut(&mut self) -> StoreContextMut<'_, ()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StoreRef
impl !RefUnwindSafe for StoreRef
impl !Send for StoreRef
impl !Sync for StoreRef
impl Unpin for StoreRef
impl !UnwindSafe for StoreRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more