pub enum ExplorationResult {
Discover(Vec<String>),
Success,
Fail(Option<String>),
}Expand description
探索結果(Exploration Result)
WorkResult を探索空間のセマンティクスに変換した結果。 Strategy は match で全ケースを処理することが強制される。
§バリアント
Discover: List 系アクションで children を発見Success: Check 系アクションで成功(ゴール到達など)Fail: 失敗(行き止まり、エラー)
§設計ノート
非同期処理(長時間タスク等)は AsyncRequest パターンで対応予定。 Worker から切り離し、Swarm レベルで Job 管理する形式を想定。 Continue バリアントは Timeout/Recover 等の考慮が必要なため、 現時点では導入しない。
Variants§
Discover(Vec<String>)
発見: children を見つけた(List 系)
e.g., List(dir) → ["file1.rs", "file2.rs"]
e.g., WebSearch(query) → ["url1", "url2", "url3"]
Strategy は各 child を target として後続ノードを展開する。
Success
成功: 処理完了(Check 系)
e.g., Read(file) → Found
e.g., Validate(result) → Pass
Strategy は後続ノードを展開して Close。
Fail(Option<String>)
失敗: 行き止まり
e.g., Read(file) → NotFound
e.g., Fetch(url) → 404
Option
Implementations§
Trait Implementations§
Source§impl Clone for ExplorationResult
impl Clone for ExplorationResult
Source§fn clone(&self) -> ExplorationResult
fn clone(&self) -> ExplorationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExplorationResult
impl Debug for ExplorationResult
Source§impl PartialEq for ExplorationResult
impl PartialEq for ExplorationResult
impl StructuralPartialEq for ExplorationResult
Auto Trait Implementations§
impl Freeze for ExplorationResult
impl RefUnwindSafe for ExplorationResult
impl Send for ExplorationResult
impl Sync for ExplorationResult
impl Unpin for ExplorationResult
impl UnwindSafe for ExplorationResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more