fedimint_client::sm::state

Trait IState

source
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§

source

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

source

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

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

Clone state

source

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

source

fn erased_hash_no_instance_id(&self, hasher: &mut dyn Hasher)

Implementors§

source§

impl<T> IState for T
where T: State,