pub trait IState<GC>: Debug + DynEncodable + MaybeSend + MaybeSync {
    // Required methods
    fn as_any(&self) -> &(dyn Any + Send + Sync);
    fn transitions(
        &self,
        context: &DynContext,
        global_context: &GC
    ) -> Vec<StateTransition<DynState<GC>>>;
    fn operation_id(&self) -> OperationId;
    fn clone(&self, module_instance_id: ModuleInstanceId) -> DynState<GC>;
    fn erased_eq_no_instance_id(&self, other: &DynState<GC>) -> bool;
}
Expand description

Object-safe version of State

Required Methods§

source

fn as_any(&self) -> &(dyn Any + Send + Sync)

source

fn transitions( &self, context: &DynContext, global_context: &GC ) -> Vec<StateTransition<DynState<GC>>>

All possible transitions from the state

source

fn operation_id(&self) -> OperationId

Operation this state machine belongs to. See OperationId for details.

source

fn clone(&self, module_instance_id: ModuleInstanceId) -> DynState<GC>

Clone state

source

fn erased_eq_no_instance_id(&self, other: &DynState<GC>) -> bool

Implementors§

source§

impl<GC, T> IState<GC> for T
where GC: GlobalContext, T: State<GlobalContext = GC>,