Struct wasm_runtime_layer::StoreContextMut
source · pub struct StoreContextMut<'a, T: 'a, E: WasmEngine> {
pub inner: E::StoreContextMut<'a, T>,
}
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
.
Fields§
§inner: E::StoreContextMut<'a, T>
The backing implementation.
Implementations§
source§impl<'a, T: 'a, E: WasmEngine> StoreContextMut<'a, T, E>
impl<'a, T: 'a, E: WasmEngine> StoreContextMut<'a, T, E>
sourcepub fn data(&self) -> &T
pub fn data(&self) -> &T
Access the underlying data owned by this store.
Same as Store::data
.
sourcepub fn data_mut(&mut self) -> &mut T
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>
impl<'a, T: 'a, E: WasmEngine> AsContext for StoreContextMut<'a, T, E>
source§impl<'a, T: 'a, E: WasmEngine> AsContextMut for StoreContextMut<'a, T, E>
impl<'a, T: 'a, E: WasmEngine> AsContextMut for StoreContextMut<'a, T, E>
source§fn as_context_mut(
&mut self
) -> StoreContextMut<'_, Self::UserState, Self::Engine>
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> Freeze for StoreContextMut<'a, T, E>
impl<'a, T, E> RefUnwindSafe for StoreContextMut<'a, T, E>
impl<'a, T, E> Send for StoreContextMut<'a, T, E>
impl<'a, T, E> Sync for StoreContextMut<'a, T, E>
impl<'a, T, E> Unpin for StoreContextMut<'a, T, E>
impl<'a, T, E> UnwindSafe for StoreContextMut<'a, T, E>
Blanket Implementations§
source§impl<E, C> AsContext<E> for Cwhere
C: AsContext<Engine = E>,
E: WasmEngine,
impl<E, C> AsContext<E> for Cwhere
C: AsContext<Engine = E>,
E: WasmEngine,
source§fn as_context(
&self
) -> <E as WasmEngine>::StoreContext<'_, <C as AsContext<E>>::UserState>
fn as_context( &self ) -> <E as WasmEngine>::StoreContext<'_, <C as AsContext<E>>::UserState>
Returns the store context that this type provides access to.
source§impl<E, C> AsContextMut<E> for Cwhere
C: AsContextMut<Engine = E>,
E: WasmEngine,
impl<E, C> AsContextMut<E> for Cwhere
C: AsContextMut<Engine = E>,
E: WasmEngine,
source§fn as_context_mut(
&mut self
) -> <E as WasmEngine>::StoreContextMut<'_, <C as AsContext<E>>::UserState>
fn as_context_mut( &mut self ) -> <E as WasmEngine>::StoreContextMut<'_, <C as AsContext<E>>::UserState>
Returns the store context that this type provides access to.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more