about summary refs log tree commit diff
path: root/finito-core/src/lib.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-09-26T14·51+0200
committerVincent Ambo <mail@tazj.in>2018-09-26T14·54+0200
commitc03e14758f53eeeecfe8067dd2eff9e9d32c1edd (patch)
tree4179c7bdc67683a684d1e67298df44c8e54d1246 /finito-core/src/lib.rs
parent60824a06f1db981a07d738c71ba65c965a473838 (diff)
fix(core): Add missing 'FSM_NAME' associated constant
This one got lost while moving from the prototype code to the proper
library.
Diffstat (limited to 'finito-core/src/lib.rs')
-rw-r--r--finito-core/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/finito-core/src/lib.rs b/finito-core/src/lib.rs
index 2b3258e087f7..a622134a1139 100644
--- a/finito-core/src/lib.rs
+++ b/finito-core/src/lib.rs
@@ -113,6 +113,11 @@ use std::mem;
 /// This trait is used to implement transition logic and to "tie the
 /// room together", with the room being our triplet of types.
 pub trait FSM where Self: Sized {
+    /// A human-readable string uniquely describing what this FSM
+    /// models. This is used in log messages, database tables and
+    /// various other things throughout Finito.
+    const FSM_NAME: &'static str;
+
     /// The associated event type of an FSM represents all possible
     /// events that can occur in the state-machine.
     type Event;