AsEngineRef

Trait AsEngineRef 

Source
pub trait AsEngineRef {
    // Required method
    fn as_engine_ref(&self) -> EngineRef<'_>;

    // Provided method
    fn maybe_as_store(&self) -> Option<StoreRef<'_>> { ... }
}
Expand description

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

Required Methods§

Source

fn as_engine_ref(&self) -> EngineRef<'_>

Create an EngineRef pointing to the underlying context.

Provided Methods§

Source

fn maybe_as_store(&self) -> Option<StoreRef<'_>>

Create a StoreRef.

NOTE: this function will return None if the AsEngineRef implementor is not an actual crate::Store.

Implementors§

Source§

impl AsEngineRef for Engine

Source§

impl AsEngineRef for EngineRef<'_>

Source§

impl AsEngineRef for cardinal_wasm_plugins::wasmer::Store

Source§

impl AsEngineRef for StoreMut<'_>

Source§

impl AsEngineRef for StoreRef<'_>

Source§

impl AsEngineRef for cardinal_wasm_plugins::wasmer::sys::store::Store

Source§

impl<P> AsEngineRef for P
where P: Deref, <P as Deref>::Target: AsEngineRef,