pub enum TurnOutcome {
Success,
PolicyExceeded {
reason: String,
},
ContextOverflow,
ProviderError {
message: String,
},
PipelineError {
message: String,
},
NoToolCalls,
NotToolCalls {
finish_reason: FinishReason,
},
ToolFailure {
message: String,
},
OutputTruncated,
}Expand description
Outcome of a turn — what the state produced.
Drives the transition to the next state.
Variants§
Success
State executed successfully.
PolicyExceeded
Policy limit reached (iteration or token).
ContextOverflow
Provider returned a context overflow error.
ProviderError
Provider returned a non-retryable error.
PipelineError
Context or storage error.
NoToolCalls
Model response has no tool calls — agent is done.
NotToolCalls
Model finish reason is not ToolCalls — agent is done.
Fields
§
finish_reason: FinishReasonThe finish reason that stopped the loop.
ToolFailure
Tool execution failed and policy does not allow continuation.
OutputTruncated
Model output was truncated (FinishReason::Length). Recovery may be attempted.
Trait Implementations§
Source§impl Clone for TurnOutcome
impl Clone for TurnOutcome
Source§fn clone(&self) -> TurnOutcome
fn clone(&self) -> TurnOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TurnOutcome
impl RefUnwindSafe for TurnOutcome
impl Send for TurnOutcome
impl Sync for TurnOutcome
impl Unpin for TurnOutcome
impl UnsafeUnpin for TurnOutcome
impl UnwindSafe for TurnOutcome
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