pub struct ToolResult {
pub body: Value,
pub is_error: bool,
}Expand description
One tools/call outcome: the JSON the tool’s text content held, and
whether the server flagged it (isError; the body is then the error
envelope of spec/surface §4 — { error, message, data?, retriable }).
Fields§
§body: Value§is_error: boolImplementations§
Source§impl ToolResult
impl ToolResult
Sourcepub fn into_result(self, tool: &str) -> Result<Value>
pub fn into_result(self, tool: &str) -> Result<Value>
The body, or the envelope as an Error::Other carrying the code
and message (the reference’s tool <name> failed: <code> — <message>).
Trait Implementations§
Source§impl Clone for ToolResult
impl Clone for ToolResult
Source§impl Debug for ToolResult
impl Debug for ToolResult
Source§impl PartialEq for ToolResult
impl PartialEq for ToolResult
impl StructuralPartialEq for ToolResult
Auto Trait Implementations§
impl Freeze for ToolResult
impl RefUnwindSafe for ToolResult
impl Send for ToolResult
impl Sync for ToolResult
impl Unpin for ToolResult
impl UnsafeUnpin 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