fedimint_client::sm

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 IState for DynState

Source§

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