pub struct ToolError {
pub kind: ToolFailure,
pub message: String,
}Expand description
A tool call that could not run, such as invalid arguments. The runtime
turns it into a failed ToolOutput whose content is message.
Fields§
§kind: ToolFailure§message: StringImplementations§
Trait Implementations§
impl Eq for ToolError
Source§impl Error for ToolError
impl Error for ToolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<String> for ToolError
impl From<String> for ToolError
Source§fn from(message: String) -> Self
fn from(message: String) -> Self
A ToolFailure::Failed error.
Source§impl From<ToolError> for ToolOutput
impl From<ToolError> for ToolOutput
impl StructuralPartialEq for ToolError
Auto Trait Implementations§
impl Freeze for ToolError
impl RefUnwindSafe for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin for ToolError
impl UnsafeUnpin for ToolError
impl UnwindSafe for ToolError
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