pub trait ActionExtractor {
// Required methods
fn action_name(&self) -> &str;
fn target(&self) -> Option<&str>;
// Provided method
fn extract(&self) -> (&str, Option<&str>) { ... }
}Expand description
ノードデータから action_name と target を抽出する trait
SelectionLogic の実装でスコアベースの選択を行う際に使用。
GraphMap<N, E, S> の N がこの trait を実装していれば、
ノードから action/target を取り出してスコア計算できる。
Required Methods§
Sourcefn action_name(&self) -> &str
fn action_name(&self) -> &str
アクション名を取得