pub struct Completion {
pub content: Vec<ContentBlock>,
pub usage: Usage,
pub stop: StopReason,
}Expand description
One normalized completion: the parsed result of a single model call (ADR-0007).
This is not a serde mirror of any wire (Anthropic returns interleaved content
blocks, OpenAI returns split fields); each wire parses its raw response into
this shape. Following Grok Build’s normalized response, the assistant turn is an
ordered list of ContentBlocks (Text / Thinking{signature} / ToolUse,
in order) rather than pre-split text + tool_calls — so nothing is lost and
the engine can append content straight into an assistant
Message (ADR-0013),
preserving thinking blocks and their signatures for replay.
Fields§
§content: Vec<ContentBlock>The assistant turn’s content blocks, in order.
usage: UsageToken accounting parsed from the terminal usage event.
stop: StopReasonWhy the model stopped.
Implementations§
Source§impl Completion
impl Completion
Trait Implementations§
Source§impl Clone for Completion
impl Clone for Completion
Source§fn clone(&self) -> Completion
fn clone(&self) -> Completion
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 Completion
impl Debug for Completion
Source§impl PartialEq for Completion
impl PartialEq for Completion
impl StructuralPartialEq for Completion
Auto Trait Implementations§
impl Freeze for Completion
impl RefUnwindSafe for Completion
impl Send for Completion
impl Sync for Completion
impl Unpin for Completion
impl UnsafeUnpin for Completion
impl UnwindSafe for Completion
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