pub trait IState:
Debug
+ DynEncodable
+ MaybeSend
+ MaybeSync {
// Required methods
fn as_any(&self) -> &(dyn Any + Send + Sync);
fn transitions(
&self,
context: &DynContext,
global_context: &DynGlobalClientContext,
) -> Vec<StateTransition<DynState>>;
fn operation_id(&self) -> OperationId;
fn clone(&self, module_instance_id: ModuleInstanceId) -> DynState;
fn erased_eq_no_instance_id(&self, other: &DynState) -> bool;
fn erased_hash_no_instance_id(&self, hasher: &mut dyn Hasher);
}
Expand description
Object-safe version of State
Required Methods§
fn as_any(&self) -> &(dyn Any + Send + Sync)
Sourcefn transitions(
&self,
context: &DynContext,
global_context: &DynGlobalClientContext,
) -> Vec<StateTransition<DynState>>
fn transitions( &self, context: &DynContext, global_context: &DynGlobalClientContext, ) -> Vec<StateTransition<DynState>>
All possible transitions from the state
Sourcefn operation_id(&self) -> OperationId
fn operation_id(&self) -> OperationId
Operation this state machine belongs to. See OperationId
for
details.
Sourcefn clone(&self, module_instance_id: ModuleInstanceId) -> DynState
fn clone(&self, module_instance_id: ModuleInstanceId) -> DynState
Clone state