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§
Sourcefn action_name(&self) -> &str
fn action_name(&self) -> &str
実行したアクション名
Sourcefn result(&self) -> &ExplorationResult
fn result(&self) -> &ExplorationResult
アクション実行結果
Strategy は match で全ケースを処理する必要がある。