pub struct Store<T> { /* private fields */ }
Expand description
A Store
holds the runtime state of a Spin instance.
In general, a Store
is expected to live only for the lifetime of a single
Spin trigger invocation.
A Store
can be built with a StoreBuilder
.
Implementations§
Source§impl<T> Store<T>
impl<T> Store<T>
Sourcepub fn set_deadline(&mut self, deadline: Instant)
pub fn set_deadline(&mut self, deadline: Instant)
Sets the execution deadline.
This is a rough deadline; an instance will trap some time after this
deadline, determined by EngineBuilder::epoch_tick_interval
and
details of the system’s thread scheduler.
Sourcepub fn data(&self) -> &T
pub fn data(&self) -> &T
Provides access to the inner wasmtime::Store
’s data.
Sourcepub fn data_mut(&mut self) -> &mut T
pub fn data_mut(&mut self) -> &mut T
Provides access to the inner wasmtime::Store
’s data.
Trait Implementations§
Source§impl<T> AsContext for Store<T>
impl<T> AsContext for Store<T>
Source§fn as_context(&self) -> StoreContext<'_, Self::Data>
fn as_context(&self) -> StoreContext<'_, Self::Data>
Returns the store context that this type provides access to.
Source§impl<T> AsContextMut for Store<T>
impl<T> AsContextMut for Store<T>
Source§fn as_context_mut(&mut self) -> StoreContextMut<'_, Self::Data>
fn as_context_mut(&mut self) -> StoreContextMut<'_, Self::Data>
Returns the store context that this type provides access to.
Auto Trait Implementations§
impl<T> Freeze for Store<T>
impl<T> !RefUnwindSafe for Store<T>
impl<T> Send for Store<T>where
T: Send,
impl<T> Sync for Store<T>where
T: Sync,
impl<T> Unpin for Store<T>
impl<T> !UnwindSafe for Store<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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