pub enum ToolError {
ExecutionFailed(String),
NotFound(String),
InvalidArgs(String),
Cancelled,
Timeout(Duration),
Other(String),
}Expand description
Errors that can occur during tool execution.
Variants§
ExecutionFailed(String)
The tool’s execution logic failed.
NotFound(String)
No tool with this name is registered.
InvalidArgs(String)
The arguments provided to the tool were invalid.
Cancelled
The tool call was cancelled before completion.
Timeout(Duration)
The tool call exceeded its timeout.
Other(String)
A catch-all for other tool errors.
Trait Implementations§
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()
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