Releases: korken89/smlang-rs
Releases · korken89/smlang-rs
v0.8.0
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 replacedlog_state_change
as it is more flexible.
Full Changelog: v0.7.0...v0.8.0
v0.7.0
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>
andon_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
andStateMachine::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
- @maximeborges made their first contribution in #64
- @asmfreak made their first contribution in #62
- @mhammerly made their first contribution in #68
- @dkumsh made their first contribution in #72
- @MartinBroers made their first contribution in #66
Full Changelog: v0.6.0...v0.7.0