pub struct ToolCallResultEvent {
pub base: BaseEvent,
pub message_id: MessageId,
pub tool_call_id: ToolCallId,
pub content: String,
pub role: Option<ToolResultRole>,
pub subagent_run_id: Option<SubagentRunId>,
}Expand description
The result of a tool call, as a message appended to the thread.
Fields§
§base: BaseEventTimestamp and raw provider event.
message_id: MessageIdId of the tool message carrying the result.
tool_call_id: ToolCallIdThe call this result answers.
content: StringThe result, already rendered to a string.
role: Option<ToolResultRole>Always "tool" when present.
subagent_run_id: Option<SubagentRunId>The subagent that executed the call; absent means the parent agent.
A JSON null is rejected — see crate::event::subagent. Attributed
independently of the call it answers, on purpose: a frontend-executed
tool, or a supervisor running a call on a subagent’s behalf, produces
a result whose owner is not the caller.
Implementations§
Trait Implementations§
Source§impl Clone for ToolCallResultEvent
impl Clone for ToolCallResultEvent
Source§fn clone(&self) -> ToolCallResultEvent
fn clone(&self) -> ToolCallResultEvent
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 ComposeSchema for ToolCallResultEvent
impl ComposeSchema for ToolCallResultEvent
Source§impl Debug for ToolCallResultEvent
impl Debug for ToolCallResultEvent
Source§impl Default for ToolCallResultEvent
impl Default for ToolCallResultEvent
Source§fn default() -> ToolCallResultEvent
fn default() -> ToolCallResultEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolCallResultEvent
impl<'de> Deserialize<'de> for ToolCallResultEvent
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 From<ToolCallResultEvent> for Event
impl From<ToolCallResultEvent> for Event
Source§fn from(payload: ToolCallResultEvent) -> Self
fn from(payload: ToolCallResultEvent) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for ToolCallResultEvent
impl JsonSchema for ToolCallResultEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ToolCallResultEvent
impl PartialEq for ToolCallResultEvent
Source§fn eq(&self, other: &ToolCallResultEvent) -> bool
fn eq(&self, other: &ToolCallResultEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolCallResultEvent
impl Serialize for ToolCallResultEvent
impl StructuralPartialEq for ToolCallResultEvent
Auto Trait Implementations§
impl Freeze for ToolCallResultEvent
impl RefUnwindSafe for ToolCallResultEvent
impl Send for ToolCallResultEvent
impl Sync for ToolCallResultEvent
impl Unpin for ToolCallResultEvent
impl UnsafeUnpin for ToolCallResultEvent
impl UnwindSafe for ToolCallResultEvent
Blanket Implementations§
impl<T> AgentState for T
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