pub trait Rules: Send + Sync {
// Required methods
fn successors(&self, node_type: &str) -> Vec<&str>;
fn roots(&self) -> Vec<&str>;
fn is_terminal(&self, node_type: &str) -> bool;
fn is_empty(&self) -> bool;
// Provided method
fn param_variants(&self, _node_type: &str) -> Option<(&str, &[String])> { ... }
}Expand description
遷移制約の抽象化
MutationLogic の R に対する trait bound。
これにより Operator は型パラメータでルールを強制される。
§実装者
NodeRules: 汎用的な遷移ルールDependencyGraph: ドメイン固有のグラフ(直接実装も可能)
Required Methods§
Sourcefn successors(&self, node_type: &str) -> Vec<&str>
fn successors(&self, node_type: &str) -> Vec<&str>
指定 node_type の後に来れる node_type 一覧
Sourcefn is_terminal(&self, node_type: &str) -> bool
fn is_terminal(&self, node_type: &str) -> bool
終端かどうか