pub struct OwnedYielded<'h, Ctx: LoopDepth + Send + Sync + 'static> {
pub tool_calls: Vec<ToolCall>,
pub results: Vec<ToolResult>,
pub assistant_content: Vec<ContentBlock>,
pub iteration: u32,
pub total_usage: Usage,
pub events: Vec<LoopEvent>,
/* private fields */
}Expand description
Handle returned when tools were executed on an OwnedToolLoopHandle.
Same API as Yielded but borrows an
OwnedToolLoopHandle instead of a ToolLoopHandle.
Fields§
§tool_calls: Vec<ToolCall>The tool calls the LLM requested.
results: Vec<ToolResult>Results from executing those tool calls.
assistant_content: Vec<ContentBlock>Text content from the LLM’s response alongside the tool calls.
iteration: u32Current iteration number (1-indexed).
total_usage: UsageAccumulated usage across all iterations so far.
events: Vec<LoopEvent>Lifecycle events from this turn.
See Yielded::events for details.
Implementations§
Source§impl<'h, Ctx: LoopDepth + Send + Sync + 'static> OwnedYielded<'h, Ctx>
impl<'h, Ctx: LoopDepth + Send + Sync + 'static> OwnedYielded<'h, Ctx>
Sourcepub fn resume(self, command: LoopCommand)
pub fn resume(self, command: LoopCommand)
Continue with the given command.
Sourcepub fn continue_loop(self)
pub fn continue_loop(self)
Convenience: continue to the next LLM iteration with no injected messages.
Sourcepub fn inject_and_continue(self, messages: Vec<ChatMessage>)
pub fn inject_and_continue(self, messages: Vec<ChatMessage>)
Convenience: inject messages and continue.
Sourcepub fn assistant_text(&self) -> Option<String>
pub fn assistant_text(&self) -> Option<String>
Extract text from assistant_content blocks.
Returns the LLM’s “thinking aloud” text emitted alongside tool calls,
or None if there were no text blocks.
Sourcepub fn messages(&self) -> &[ChatMessage]
pub fn messages(&self) -> &[ChatMessage]
Access the full message history (read-only).
Sourcepub fn messages_mut(&mut self) -> &mut Vec<ChatMessage>
pub fn messages_mut(&mut self) -> &mut Vec<ChatMessage>
Access the full message history (mutable, for context compaction).