pub struct ToolResult { /* private fields */ }Implementations§
Source§impl ToolResult
impl ToolResult
pub fn from_output(output: ToolCallOutput) -> Self
pub fn ok(result: Value) -> Self
pub fn err(result: Value) -> Self
pub fn err_fmt(msg: impl Display) -> Self
pub fn failure(failure: ToolFailure) -> Self
pub fn retryable_failure( class: ToolFailureClass, code: impl Into<String>, message: impl Into<String>, after_ms: Option<u64>, ) -> Self
pub fn cancelled(message: impl Into<String>) -> Self
pub fn cancelled_with_raw(message: impl Into<String>, raw: Value) -> Self
pub fn with_control(self, control: ToolControl) -> Self
pub fn is_success(&self) -> bool
pub fn value_for_projection(&self) -> Value
pub fn as_output(&self) -> &ToolCallOutput
pub fn into_output(self) -> ToolCallOutput
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 (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 Debug for ToolResult
impl Debug for ToolResult
Source§impl<T, E> From<Result<T, E>> for ToolResult
impl<T, E> From<Result<T, E>> for ToolResult
Source§impl PartialEq for ToolResult
impl PartialEq for ToolResult
Source§fn eq(&self, other: &ToolResult) -> bool
fn eq(&self, other: &ToolResult) -> bool
Tests for
self and other values to be equal, and is used by ==.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