pub struct TurnOutput {
pub text: String,
pub reasoning: String,
pub tool_calls: Vec<ToolCall>,
pub usage: Usage,
pub grounded: bool,
pub stop: Option<StopReason>,
}Expand description
The fully-assembled result of one turn, folded from a Chunk stream.
Fields§
§text: StringConcatenated text deltas.
reasoning: StringConcatenated reasoning (“thinking”) deltas, kept separate from text.
Empty for providers/models that don’t expose reasoning.
tool_calls: Vec<ToolCall>Completed tool calls, in arrival order.
usage: UsageFinal token accounting (last Chunk::Usage seen).
grounded: boolWhether the provider’s native web-search-grounding primitive actually
fired this turn — folded from Chunk::Grounded, which a provider
emits only on response-side proof of use, never merely because
grounding was allowed on the request. false for every provider that
doesn’t support native grounding, correctly: it structurally cannot
have fired there.
stop: Option<StopReason>Why the turn ended, if the stream reported it.
Trait Implementations§
Source§impl Clone for TurnOutput
impl Clone for TurnOutput
Source§fn clone(&self) -> TurnOutput
fn clone(&self) -> TurnOutput
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 TurnOutput
impl Debug for TurnOutput
Source§impl Default for TurnOutput
impl Default for TurnOutput
Source§fn default() -> TurnOutput
fn default() -> TurnOutput
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TurnOutput
impl RefUnwindSafe for TurnOutput
impl Send for TurnOutput
impl Sync for TurnOutput
impl Unpin for TurnOutput
impl UnsafeUnpin for TurnOutput
impl UnwindSafe for TurnOutput
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