pub struct ToolResult {
pub session_id: i64,
pub tool_name: String,
pub display_name: Option<String>,
pub tool_use_id: String,
pub input: HashMap<String, Value>,
pub content: String,
pub status: ToolResultStatus,
pub error: Option<String>,
pub turn_id: Option<TurnId>,
pub compact_summary: Option<String>,
}Expand description
Result from a single tool execution.
Fields§
§session_id: i64Session that requested the tool execution.
tool_name: StringTool name for registry lookup.
display_name: Option<String>UI-friendly display name from tool’s DisplayConfig.
tool_use_id: StringLinks result to tool use request from LLM.
input: HashMap<String, Value>Original input parameters.
content: StringResult content.
status: ToolResultStatusExecution status.
error: Option<String>Error message if status is Error.
turn_id: Option<TurnId>Assistant turn ID for this tool result.
compact_summary: Option<String>Pre-computed summary for compaction.
Implementations§
Source§impl ToolResult
impl ToolResult
Sourcepub fn success(
session_id: i64,
tool_name: String,
display_name: Option<String>,
tool_use_id: String,
input: HashMap<String, Value>,
content: String,
turn_id: Option<TurnId>,
compact_summary: Option<String>,
) -> Self
pub fn success( session_id: i64, tool_name: String, display_name: Option<String>, tool_use_id: String, input: HashMap<String, Value>, content: String, turn_id: Option<TurnId>, compact_summary: Option<String>, ) -> Self
Create a successful tool result.
Trait Implementations§
Source§impl Clone for ToolResult
impl Clone for ToolResult
Source§fn clone(&self) -> ToolResult
fn clone(&self) -> ToolResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolResult
impl RefUnwindSafe for ToolResult
impl Send for ToolResult
impl Sync for ToolResult
impl Unpin for ToolResult
impl UnwindSafe for ToolResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more