pub enum TurnOutcome {
Success {
response: String,
iterations: usize,
tool_calls_count: usize,
stop_reason: TurnStopReason,
},
Failed {
error: String,
iterations: usize,
stop_reason: TurnStopReason,
},
MaxIterationsReached {
response: String,
iterations: usize,
tool_calls_count: usize,
},
Sealed {
reason: SealReason,
response: String,
iterations: usize,
tool_calls_count: usize,
},
}Expand description
Final outcome of a turn.
Variants§
Success
Turn completed successfully
Fields
stop_reason: TurnStopReasonStructured reason the final generation stopped.
Failed
Turn failed due to an error
Fields
stop_reason: TurnStopReasonStructured reason the turn failed.
MaxIterationsReached
Turn stopped due to max iterations limit
Fields
Sealed
Turn was deliberately sealed to prevent further waste (EVE-534).
Distinct from Success (work finished) and Failed (an error ended the
turn): Sealed means the engine chose to stop a turn that would
otherwise keep consuming resources without progressing. Sealed turns are
terminal and non-retryable — the durable task is routed to the DLQ
rather than requeued, and a turn.sealed event is emitted.
Implementations§
Source§impl TurnOutcome
impl TurnOutcome
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the turn completed successfully
Sourcepub fn seal_reason(&self) -> Option<SealReason>
pub fn seal_reason(&self) -> Option<SealReason>
Get the seal reason, if the turn was sealed.
Sourcepub fn stop_reason(&self) -> TurnStopReason
pub fn stop_reason(&self) -> TurnStopReason
Return the stable reason this outcome stopped.
Sourcepub fn iterations(&self) -> usize
pub fn iterations(&self) -> usize
Get the number of iterations
Trait Implementations§
Source§impl Clone for TurnOutcome
impl Clone for TurnOutcome
Source§fn clone(&self) -> TurnOutcome
fn clone(&self) -> TurnOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request