Enum ToolError
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§
§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()
§impl From<ToolError> for AgentError
impl From<ToolError> for AgentError
§fn from(source: ToolError) -> AgentError
fn from(source: ToolError) -> AgentError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToolError
impl RefUnwindSafe for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin 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