Trait 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,

Source§

type Data = <T as AsContext>::Data

Source§

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

Source§

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

Source§

type Data = <T as AsContext>::Data

Source§

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

Implementors§

Source§

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

Source§

type Data = T

Source§

impl<T> AsContext for Store<T>

Source§

type Data = T

Source§

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

Source§

type Data = T

Source§

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

Source§

type Data = T