Skip to content

Releases: korken89/smlang-rs

v0.8.0

09 Aug 08:55
f9a12bd
Compare
Choose a tag to compare

Added

  • Add transition callback. A function which is called for every transition. It has default empty
    implementation.
  • Add support for implicit and wildcard internal transitions

Changed

  • [breaking] Renamed custom_guard_error flag to custom_error as it is not guard specific anymore
  • [breaking] Re-ordered on_exit/on_entry hooks calls
  • [breaking] New transition_callback has replaced log_state_change as it is more flexible.

Full Changelog: v0.7.0...v0.8.0

v0.7.0

03 Jul 16:14
32d7513
Compare
Choose a tag to compare

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