All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- 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
- [breaking] Actions now take owned values
- [breaking]
state()
now returns aResult
StateMachine::new
andStateMachine::new_with_state
are now const functions- Fixed clippy warnings
v0.6.0 - 2022-11-02
- Updated the link checker in the Github actions to use lychee.
- Starting state can now contain data (issue-34)
- Allow explicit input states before wildcard input state(issue-47
- Custom guard error types are now specified as a type of the
StateMachineContext
to allow for more versatile types.
- #36 Attempts to use actions and guards with inconsistent input, event, and output state data will be flagged as compiler errors.
- Changelog enforcer added to CI
- State data now supports lifetimes (issue-26)
- New example dominos.rs illustrating a method of event propagation (issue-17)
- Input states support pattern matching and wildcards (issue-29)
- PartialEq for States and Events based on discriminant only (issue-21)
- Updated the CI badges (issue-30)
- Initial state can be specified at runtime.
v0.4.1 -- YANKED
- Introduce a new named syntax, supporting
guard_error
,transitions
andtemporary_context
- The ability to define custom guard errors
- No longer needed to define each action, the same action can now be reused.
- Added syntax and support for a temporary context which is propagated from
process_event
. This allows for usage in systems where the normal context cannot take ownership, such as when having a reference which is only valid during the invocation of the state machine. For an example of this feature seeexamples/guard_action_syntax_with_temporary_context.rs
.
- Now compatible with
#![deny(missing_docs)]
.
- Having states with data associated, but no action to set this data, caused arcane errors. This is now fixed.
- Destination state may now have a type associated with it
- Better documentation and examples
- Graphviz diagrams only generated if feature is enabled
- API documentation should now be correctly generated in a project
- [breaking] Most derives on
States
,Events
(Copy
,Clone
,Debug
) and trait bounds onStateMachineContext
are removed. - [breaking] All returns of state are now by reference
- [breaking] Guards now take self my mutable reference, this to allow for context modifications. Quite common when receiving the same event N times can be accepted as a transition. Before one would have to have a long list of states to go through.
- Most function are made
#[inline]
- Lifetime support added to guards and actions
- Basic lifetime support for event data
- Support for generating a graphviz file over the state machine
- Support for data in events
- Support for data in states
- Change log added