45afa18846
Changes the implementation of action execution to deal with the returned associated errors. The only sensible constraint on those errors that I could think of for now is `Debug`, meaning that errors are now persisted as debug messages. This is not as nice to work with for a future implementation of retryable actions as the equivalent in Haskell, but maybe an idea shows up underway. The main issue is that most of the common error types will not be implementing Serde traits, so serialization to/from the same error type is difficult. Adding an implementation constraint for JSON serialisation on error types (i.e. `S::Error: Serialize + Deserialize`) would probably cause headaches for users, especially if they are trying to use an out-of-the-box error type or an error type wrapping foreign errors. Det ska'kke være lett ... |
||
---|---|---|
finito-core | ||
finito-door | ||
finito-postgres | ||
.gitignore | ||
Cargo.toml | ||
README.md |
Finito
This is a Rust port of the Haskell state-machine library Finito. It is slightly less featureful because it loses the ability to ensure that side-effects are contained and because of a slight reduction in expressivity, which makes it a bit more restrictive.
However, it still implements the FSM model well enough.
Components
Finito is split up into multiple independent components (note: not all of these exist yet), separating functionality related to FSM persistence from other things.
finito
: Core abstraction implemented by Finitofinito-door
: Example implementation of a simple, lockable doorfinito-postgres
: Persistent state-machines using Postgres
Note: The finito
core library does not contain any tests. Its
coverage is instead provided by the finito-door
library, which
actually implements an example FSM.
These are split out because the documentation for finito-door
is
interesting regardless and because other Finito packages also need an
example implementation.