pub struct ToolResultView<'a> {
pub call_id: Option<&'a str>,
pub name: &'a str,
pub response: &'a Value,
}Expand description
A typed, borrowed view of a single tool result carried by an Event.
Produced by Event::tool_results. Surfaces a completed tool’s output
generically so any tool — streaming or not — can be rendered from the event
stream without walking Part::FunctionResponse
internals.
Fields§
§call_id: Option<&'a str>Provider-assigned call id (OpenAI-style), correlating this result with
its originating ToolCallView and progress chunks. None for
providers that omit it (e.g. Gemini); fall back to name.
name: &'a strThe tool/function name that produced this result.
response: &'a ValueThe tool’s JSON response payload.
Trait Implementations§
Source§impl<'a> Clone for ToolResultView<'a>
impl<'a> Clone for ToolResultView<'a>
Source§fn clone(&self) -> ToolResultView<'a>
fn clone(&self) -> ToolResultView<'a>
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 moreimpl<'a> Copy for ToolResultView<'a>
Source§impl<'a> Debug for ToolResultView<'a>
impl<'a> Debug for ToolResultView<'a>
impl<'a> Eq for ToolResultView<'a>
Source§impl<'a> PartialEq for ToolResultView<'a>
impl<'a> PartialEq for ToolResultView<'a>
impl<'a> StructuralPartialEq for ToolResultView<'a>
Auto Trait Implementations§
impl<'a> Freeze for ToolResultView<'a>
impl<'a> RefUnwindSafe for ToolResultView<'a>
impl<'a> Send for ToolResultView<'a>
impl<'a> Sync for ToolResultView<'a>
impl<'a> Unpin for ToolResultView<'a>
impl<'a> UnsafeUnpin for ToolResultView<'a>
impl<'a> UnwindSafe for ToolResultView<'a>
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