Trait wasmi::AsContext

source ·
pub trait AsContext {
    type Data;

    // Required method
    fn as_context(&self) -> StoreContext<'_, Self::Data>;
}
Expand description

A trait used to get shared access to a Store in Wasmi.

Required Associated Types§

source

type Data

The user state associated with the Store, aka the T in Store<T>.

Required Methods§

source

fn as_context(&self) -> StoreContext<'_, Self::Data>

Returns the store context that this type provides access to.

Implementations on Foreign Types§

source§

impl<T> AsContext for &T
where T: AsContext,

§

type Data = <T as AsContext>::Data

source§

fn as_context(&self) -> StoreContext<'_, T::Data>

source§

impl<T> AsContext for &mut T
where T: AsContext,

§

type Data = <T as AsContext>::Data

source§

fn as_context(&self) -> StoreContext<'_, T::Data>

Implementors§

source§

impl<T> AsContext for Caller<'_, T>

§

type Data = T

source§

impl<T> AsContext for Store<T>

§

type Data = T

source§

impl<T> AsContext for StoreContext<'_, T>

§

type Data = T

source§

impl<T> AsContext for StoreContextMut<'_, T>

§

type Data = T