Finite state machines in rust; bendns fork to add types.
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/README.md b/README.md
index 02a7bc0..fc1e5e9 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,7 @@ The DSL is parsed by the `state_machine` macro. Here is a little example.
use rust_fsm::*;
state_machine! {
+ derive(Debug)
CircuitBreaker(Closed)
Closed(Unsuccessful) => Open [SetupTimer],
@@ -60,6 +61,7 @@ state_machine! {
This code sample:
* Defines a state machine called `CircuitBreaker`;
+* Derives the `Debug` trait for it (the `derive` section is optional);
* Sets the initial state of this state machine to `Closed`;
* Defines state transitions. For example: on receiving the `Successful`
input when in the `HalfOpen` state, the machine must move to the `Closed`