Expand description
If-this-then-that over an event history: rule specs generic over the application’s
then-actions, the condition syntax and comparison, templates, every/cron schedules, and a
matching, loop-protected engine that reaches the application only through engine::Host.
Modules§
- compare
- How a condition compares a JSON value: numbers as numbers, text case-insensitively with
*globs for=, arrays by any element (and by length for</>), missing values only satisfying!?,!=and!~. - engine
- Matching and running rules against events, with loop protection.
- schedule
- Schedules:
every 6hand five-field cron, their text forms, and when a rule runs next. - syntax
- The text forms:
onpatterns, conditions, lists, words and quoting. - template
- Templates:
{rule},{date},{time},{now}and{FIELD}from a lookup.
Structs§
- Condition
field op value, e.g.inserted > 0,format = pdf,summary ~ btc.- Rule
Spec - When a rule runs and what it does;
Tis the application’s then-action.
Enums§
- Op
- How a condition compares.
- Rules
Error - A rule, condition, pattern or schedule that does not parse.
- Schedule
- When a scheduled rule runs: every so often (
every 6h) or at cron times (cron "0 3 * * *"). Seecrate::schedule::next_run.
Constants§
- SPEC_
VERSION - Spec version written by this crate.
Traits§
- Then
Action - A then-action of the application’s own type: the engine only needs its verb (for run results and failure messages).