Trait AsStoreRef

Source
pub trait AsStoreRef {
    // Required method
    fn as_store_ref(&self) -> StoreRef<'_>;

    // Provided method
    fn as_store_async(&self) -> Option<impl AsStoreAsync + 'static> { ... }
}
Expand description

Helper trait for a value that is convertible to a StoreRef.

Required Methods§

Source

fn as_store_ref(&self) -> StoreRef<'_>

Returns a StoreRef pointing to the underlying context.

Provided Methods§

Source

fn as_store_async(&self) -> Option<impl AsStoreAsync + 'static>

Returns a StoreAsync if the current context is asynchronous. The store will be locked since it’s already active in the current context, but can be used to spawn new coroutines via Function::call_async.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AsStoreRef for AsyncCallStoreMut

Source§

impl AsStoreRef for StoreInner

Source§

impl AsStoreRef for Store

Source§

impl AsStoreRef for StoreAsyncReadLock

Source§

impl AsStoreRef for StoreAsyncWriteLock

Source§

impl AsStoreRef for StoreMut<'_>

Source§

impl AsStoreRef for StoreRef<'_>

Source§

impl<P> AsStoreRef for P
where P: Deref, P::Target: AsStoreRef,

Source§

impl<T> AsStoreRef for BackendFunctionEnvMut<'_, T>

Source§

impl<T> AsStoreRef for wasmer::backend::sys::entities::function::env::FunctionEnvMut<'_, T>

Source§

impl<T> AsStoreRef for wasmer::FunctionEnvMut<'_, T>

Source§

impl<T: 'static> AsStoreRef for BackendAsyncFunctionEnvHandle<T>

Source§

impl<T: 'static> AsStoreRef for BackendAsyncFunctionEnvHandleMut<T>

Source§

impl<T: 'static> AsStoreRef for wasmer::backend::sys::entities::function::env::AsyncFunctionEnvHandle<T>

Source§

impl<T: 'static> AsStoreRef for wasmer::backend::sys::entities::function::env::AsyncFunctionEnvHandleMut<T>

Source§

impl<T: 'static> AsStoreRef for wasmer::AsyncFunctionEnvHandle<T>

Source§

impl<T: 'static> AsStoreRef for wasmer::AsyncFunctionEnvHandleMut<T>