pub enum TurnResult {
Completed {
final_output: ModelOutput,
},
Interrupted {
cause: TurnInterruption,
},
Paused {
continuation: Continuation,
},
}Expand description
How a turn ended: completed, interrupted, or paused mid-turn. The
serde shapes are a load-bearing wire contract (embedded in
ContextEvent); tests/serialization.rs pins them.
Variants§
Completed
The model ended the turn (EndTurn) — no pending work remains.
Fields
§
final_output: ModelOutputThe final model output.
Interrupted
The turn stopped early; cause discriminates why.
Fields
§
cause: TurnInterruptionWhy the turn was interrupted.
Paused
Resumable suspension — not a terminal state: the turn’s facts stay
open in the outcome’s context / state (the single fact source),
the prepared batch is neither executed nor rejected, and
resume_turn / TurnRunner::resume continue the same turn from
the Continuation.
Fields
§
continuation: ContinuationThe single continuation: pause position, control counts, prepared work, and queued inputs.
Trait Implementations§
Source§impl Clone for TurnResult
impl Clone for TurnResult
Source§fn clone(&self) -> TurnResult
fn clone(&self) -> TurnResult
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 moreSource§impl Debug for TurnResult
impl Debug for TurnResult
Source§impl<'de> Deserialize<'de> for TurnResult
impl<'de> Deserialize<'de> for TurnResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TurnResult
impl RefUnwindSafe for TurnResult
impl Send for TurnResult
impl Sync for TurnResult
impl Unpin for TurnResult
impl UnsafeUnpin for TurnResult
impl UnwindSafe for TurnResult
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