Skip to main content

MutationInput

Trait MutationInput 

Source
pub trait MutationInput {
    // Required methods
    fn node_id(&self) -> MapNodeId;
    fn action_name(&self) -> &str;
    fn target(&self) -> Option<&str>;
    fn result(&self) -> &ExplorationResult;

    // Provided method
    fn dedup_key(&self) -> String { ... }
}
Expand description

MutationLogic への入力を抽象化する trait

固定型ではなく、任意の型から必要な情報を抽出できる。 これにより Agent 側の結果型を直接渡せる。

§設計意図

  • 中間型(WorkerResult)を排除
  • Orchestrator と Exploration の結合を緩める
  • 必要な情報だけを trait で定義
  • ExplorationResult による結果の明示化(Strategy が全ケース処理を強制される)

Required Methods§

Source

fn node_id(&self) -> MapNodeId

対象ノード ID

Source

fn action_name(&self) -> &str

実行したアクション名

Source

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

アクションのターゲット(Optional)

Source

fn result(&self) -> &ExplorationResult

アクション実行結果

Strategy は match で全ケースを処理する必要がある。

Provided Methods§

Source

fn dedup_key(&self) -> String

重複チェック用キーを生成

デフォルト実装: {action_name}:{target}

Implementors§