pub struct StoreContext<'a, T>(/* private fields */);
Available on crate feature
runtime
only.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