#[non_exhaustive]pub struct TurnCompletedParams {
pub session_id: String,
pub view_cursor: String,
pub source_range: SourceRange,
pub turn_id: String,
pub terminal: TurnTerminal,
pub reason: Option<String>,
pub duration_ms: Option<u64>,
pub time_to_first_token_ms: Option<u64>,
pub usage: Option<TokenUsage>,
pub error: Option<TurnError>,
}Expand description
turn/completed params: the run’s durable terminal record landed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: StringThe owning session.
view_cursor: StringOpaque, strictly monotonic view cursor.
source_range: SourceRangeThe durable records this event folded from.
turn_id: StringThe terminated turn.
terminal: TurnTerminalThe turn terminal (open enum).
reason: Option<String>The runtime’s free-text terminal reason, verbatim. Display and diagnostics only; never branch on it.
duration_ms: Option<u64>Turn duration; absent means unmeasured, never fabricated.
time_to_first_token_ms: Option<u64>Time to first token, when measured.
usage: Option<TokenUsage>The turn’s aggregate token usage, summed across the turn’s model
completions (same shape as session/tokenUsage.usage).
error: Option<TurnError>Present when terminal is "failed", except on a synthesized
host-death terminal, which carries reason instead: mid-turn failures
reach the client here — never as a JSON-RPC error.
Trait Implementations§
Source§impl Clone for TurnCompletedParams
impl Clone for TurnCompletedParams
Source§impl Debug for TurnCompletedParams
impl Debug for TurnCompletedParams
Source§impl<'de> Deserialize<'de> for TurnCompletedParams
impl<'de> Deserialize<'de> for TurnCompletedParams
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
Source§impl PartialEq for TurnCompletedParams
impl PartialEq for TurnCompletedParams
Source§impl Serialize for TurnCompletedParams
impl Serialize for TurnCompletedParams
impl StructuralPartialEq for TurnCompletedParams
Auto Trait Implementations§
impl Freeze for TurnCompletedParams
impl RefUnwindSafe for TurnCompletedParams
impl Send for TurnCompletedParams
impl Sync for TurnCompletedParams
impl Unpin for TurnCompletedParams
impl UnsafeUnpin for TurnCompletedParams
impl UnwindSafe for TurnCompletedParams
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