Struct wasmtime::StoreContext
source · pub struct StoreContext<'a, T>(/* private fields */);
Expand description
Implementations§
source§impl<'a, T> StoreContext<'a, T>
impl<'a, T> StoreContext<'a, T>
sourcepub fn data(&self) -> &'a T
pub fn data(&self) -> &'a T
Access the underlying data owned by this Store
.
Same as Store::data
.
sourcepub fn get_fuel(&self) -> Result<u64>
pub fn get_fuel(&self) -> Result<u64>
Returns the remaining fuel in this store.
For more information see Store::get_fuel
.
Trait Implementations§
source§impl<T> AsContext for StoreContext<'_, T>
impl<T> AsContext for StoreContext<'_, T>
source§fn as_context(&self) -> StoreContext<'_, T>
fn as_context(&self) -> StoreContext<'_, T>
Returns the store context that this type provides access to.
source§impl<'a, T> From<StoreContextMut<'a, T>> for StoreContext<'a, T>
impl<'a, T> From<StoreContextMut<'a, T>> for StoreContext<'a, T>
source§fn from(store: StoreContextMut<'a, T>) -> StoreContext<'a, T>
fn from(store: StoreContextMut<'a, T>) -> StoreContext<'a, T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, T> Freeze for StoreContext<'a, T>
impl<'a, T> !RefUnwindSafe for StoreContext<'a, T>
impl<'a, T> Send for StoreContext<'a, T>where
T: Sync,
impl<'a, T> Sync for StoreContext<'a, T>where
T: Sync,
impl<'a, T> Unpin for StoreContext<'a, T>
impl<'a, T> !UnwindSafe for StoreContext<'a, T>
Blanket Implementations§
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more