StateMachine

Trait StateMachine 

Source
pub trait StateMachine<S, E> {
    // Required methods
    fn move_to(&mut self, state: S) -> Result<(), E>;
    fn can_move_to(&self, state: &S) -> Result<(), E>;
}
Expand description

A generic state machine

Required Methods§

Source

fn move_to(&mut self, state: S) -> Result<(), E>

Attempt to move the state machine to a new state

Source

fn can_move_to(&self, state: &S) -> Result<(), E>

Check if the state machine can move to a new state

Implementors§

Source§

impl<Aggregator: AggregatorTrait> StateMachine<State, Error> for wsts::state_machine::coordinator::fire::Coordinator<Aggregator>

Source§

impl<Aggregator: AggregatorTrait> StateMachine<State, Error> for wsts::state_machine::coordinator::frost::Coordinator<Aggregator>

Source§

impl<SignerType: SignerTrait> StateMachine<State, Error> for Signer<SignerType>