Skip to content

v0.7.0

Compare
Choose a tag to compare
@ryan-summers ryan-summers released this 03 Jul 16:14
· 30 commits to master since this release
32d7513

Added

  • Add support for async guards and actions
  • Add name to statemachine and make dot output stable and unique (issue-62)
  • Add derive macros to states and events (issue-62)
  • Add hooks to StateMachineContext for logging events, guards, actions, and state changes
  • Add support multiple guarded transitions for a triggering event
  • Add support for guard boolean expressions in the state machine declaration
  • There are now on_entry_<snakecase_statename> and on_entry_<snakecase_statename> functions
    defined to allow handling entry and exit from all state machine states. These have a default empty
    implementation.

Fixed

Changed

  • StateMachine::new and StateMachine::new_with_state are now const functions
  • Fixed clippy warnings
  • [breaking] Changed guard functions return type from Result<(),> to Result<bool,>
  • [breaking] Changed action functions return type from () to Result<NextStateData,_>
  • [breaking] Disallow guards mutable access to the context
  • [breaking] Renamed GuardError to Error as it is now used for both guards and actions

New Contributors

Full Changelog: v0.6.0...v0.7.0