Skip to main content

ActionExtractor

Trait ActionExtractor 

Source
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§

Source

fn action_name(&self) -> &str

アクション名を取得

Source

fn target(&self) -> Option<&str>

ターゲットを取得(Optional)

Provided Methods§

Source

fn extract(&self) -> (&str, Option<&str>)

(action_name, target) のタプルとして取得

Implementors§