rstm_rules/
program.rs

1/*
2    Appellation: program <module>
3    Contrib: FL03 <jo3mccain@icloud.com>
4*/
5
6#[allow(deprecated)]
7mod impl_deprecated;
8mod impl_program;
9
10use crate::types::RuleVec;
11use rstm_state::{RawState, State};
12
13/// A [`Program`] defines an optional initial state along with a set of rules that dictate the
14/// behavior of the system.
15#[derive(Clone, Debug, Default)]
16#[cfg_attr(
17    feature = "serde",
18    derive(serde::Serialize),
19    serde(rename_all = "camelCase")
20)]
21pub struct Program<Q = String, A = char>
22where
23    Q: RawState,
24{
25    pub(crate) initial_state: Option<State<Q>>,
26    pub(crate) rules: RuleVec<Q, A>,
27}