pub struct StoreContextMut<'a, T: 'a, E: WasmEngine> { /* private fields */ }
Expand description

A temporary handle to a &mut Store<T>.

This type is suitable for AsContextMut or AsContext trait bounds on methods if desired. For more information, see Store.

Implementations§

source§

impl<'a, T: 'a, E: WasmEngine> StoreContextMut<'a, T, E>

source

pub fn engine(&self) -> &Engine<E>

Returns the underlying Engine this store is connected to.

source

pub fn data(&self) -> &T

Access the underlying data owned by this store.

Same as Store::data.

source

pub fn data_mut(&mut self) -> &mut T

Access the underlying data owned by this store.

Same as Store::data_mut.

Trait Implementations§

source§

impl<'a, T: 'a, E: WasmEngine> AsContext for StoreContextMut<'a, T, E>

§

type Engine = E

The engine type associated with the context.
§

type UserState = T

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

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

Returns the store context that this type provides access to.
source§

impl<'a, T: 'a, E: WasmEngine> AsContextMut for StoreContextMut<'a, T, E>

source§

fn as_context_mut( &mut self ) -> StoreContextMut<'_, Self::UserState, Self::Engine>

Returns the store context that this type provides access to.

Auto Trait Implementations§

§

impl<'a, T, E> RefUnwindSafe for StoreContextMut<'a, T, E>where <E as WasmEngine>::StoreContextMut<'a, T>: RefUnwindSafe,

§

impl<'a, T, E> Send for StoreContextMut<'a, T, E>where <E as WasmEngine>::StoreContextMut<'a, T>: Send,

§

impl<'a, T, E> Sync for StoreContextMut<'a, T, E>where <E as WasmEngine>::StoreContextMut<'a, T>: Sync,

§

impl<'a, T, E> Unpin for StoreContextMut<'a, T, E>where <E as WasmEngine>::StoreContextMut<'a, T>: Unpin,

§

impl<'a, T, E> UnwindSafe for StoreContextMut<'a, T, E>where <E as WasmEngine>::StoreContextMut<'a, T>: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.