pub enum CompletionOutcome {
Completed(Box<RunResult>),
CompletedWithoutResult,
CallbackPending {
tool_name: String,
args: Value,
},
Cancelled,
Abandoned(String),
AbandonedWithError {
reason: String,
error: TurnErrorMetadata,
},
CompletedWithFinalizationFailure {
result: Box<RunResult>,
error: TurnErrorMetadata,
},
RuntimeTerminated(String),
}Expand description
Outcome delivered to a completion waiter.
Variants§
Completed(Box<RunResult>)
The input was successfully consumed and produced a result.
CompletedWithoutResult
The input was consumed but produced no RunResult (e.g. context-append ops).
CallbackPending
The input reached a callback boundary and requires external tool fulfillment before the turn can continue.
Cancelled
The input reached the canonical cancellation terminal.
Abandoned(String)
The input was abandoned before completing.
AbandonedWithError
The input was abandoned before completing, with typed failure metadata.
CompletedWithFinalizationFailure
The turn produced a valid result, but a later runtime finalization step failed. Consumers can use the result while handling the mechanics error.
RuntimeTerminated(String)
The runtime was stopped or destroyed while the input was pending.
Implementations§
Source§impl CompletionOutcome
impl CompletionOutcome
pub fn abandoned_reason(&self) -> Option<&str>
pub fn error_metadata(&self) -> Option<&TurnErrorMetadata>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompletionOutcome
impl RefUnwindSafe for CompletionOutcome
impl Send for CompletionOutcome
impl Sync for CompletionOutcome
impl Unpin for CompletionOutcome
impl UnsafeUnpin for CompletionOutcome
impl UnwindSafe for CompletionOutcome
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