pub struct InstanceState<T, U> { /* private fields */ }
Expand description
InstanceState is the spin_core::Store
data
for an instance.
It is generic over the [RuntimeFactors::InstanceState
] and any ad-hoc
data needed by the caller.
Implementations§
Source§impl<T, U> InstanceState<T, U>
impl<T, U> InstanceState<T, U>
Sourcepub fn core_state(&self) -> &State
pub fn core_state(&self) -> &State
Provides access to the spin_core::State
.
Sourcepub fn core_state_mut(&mut self) -> &mut State
pub fn core_state_mut(&mut self) -> &mut State
Provides mutable access to the spin_core::State
.
Sourcepub fn factors_instance_state(&self) -> &T
pub fn factors_instance_state(&self) -> &T
Provides access to the [RuntimeFactors::InstanceState
].
Sourcepub fn factors_instance_state_mut(&mut self) -> &mut T
pub fn factors_instance_state_mut(&mut self) -> &mut T
Provides mutable access to the [RuntimeFactors::InstanceState
].
Sourcepub fn executor_instance_state(&self) -> &U
pub fn executor_instance_state(&self) -> &U
Provides access to the ad-hoc executor instance state.
Sourcepub fn executor_instance_state_mut(&mut self) -> &mut U
pub fn executor_instance_state_mut(&mut self) -> &mut U
Provides mutable access to the ad-hoc executor instance state.
Trait Implementations§
Source§impl<T: RuntimeFactorsInstanceState, U> AsInstanceState<T> for InstanceState<T, U>
impl<T: RuntimeFactorsInstanceState, U> AsInstanceState<T> for InstanceState<T, U>
fn as_instance_state(&mut self) -> &mut T
Auto Trait Implementations§
impl<T, U> Freeze for InstanceState<T, U>
impl<T, U> RefUnwindSafe for InstanceState<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for InstanceState<T, U>
impl<T, U> Sync for InstanceState<T, U>
impl<T, U> Unpin for InstanceState<T, U>
impl<T, U> UnwindSafe for InstanceState<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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