pub struct StoreContext<'a, T: 'static>(/* private fields */);
Expand description
Implementations§
Source§impl<'a, T> StoreContext<'a, T>
impl<'a, T> StoreContext<'a, T>
Sourcepub fn engine(&self) -> &Engine
Available on crate feature runtime
only.
pub fn engine(&self) -> &Engine
runtime
only.Returns the underlying Engine
this store is connected to.
Sourcepub fn data(&self) -> &'a T
Available on crate feature runtime
only.
pub fn data(&self) -> &'a T
runtime
only.Access the underlying data owned by this Store
.
Same as Store::data
.
Sourcepub fn get_fuel(&self) -> Result<u64>
Available on crate feature runtime
only.
pub fn get_fuel(&self) -> Result<u64>
runtime
only.Returns the remaining fuel in this store.
For more information see Store::get_fuel
.
Trait Implementations§
Source§impl<T: 'static> AsContext for StoreContext<'_, T>
Available on crate feature runtime
only.
impl<T: 'static> AsContext for StoreContext<'_, T>
Available on crate feature
runtime
only.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: AsContext> From<&'a T> for StoreContext<'a, T::Data>
Available on crate feature runtime
only.
impl<'a, T: AsContext> From<&'a T> for StoreContext<'a, T::Data>
Available on crate feature
runtime
only.Source§impl<'a, T: AsContext> From<&'a mut T> for StoreContext<'a, T::Data>
Available on crate feature runtime
only.
impl<'a, T: AsContext> From<&'a mut T> for StoreContext<'a, T::Data>
Available on crate feature
runtime
only.Source§impl<'a, T: 'static> From<StoreContextMut<'a, T>> for StoreContext<'a, T>
Available on crate feature runtime
only.
impl<'a, T: 'static> From<StoreContextMut<'a, T>> for StoreContext<'a, T>
Available on crate feature
runtime
only.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.
Source§impl<I, T> Index<I> for StoreContext<'_, T>where
StoreOpaque: Index<I>,
Available on crate feature runtime
only.
impl<I, T> Index<I> for StoreContext<'_, T>where
StoreOpaque: Index<I>,
Available on crate feature
runtime
only.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