pub enum ToolError {
InvalidArgument {
arg: String,
reason: String,
},
ExecutionFailed(String),
Timeout {
timeout_ms: u64,
},
}Expand description
Errors a tool can produce during execution.
These represent tool-level failures: bad args, network errors, timeouts. They are distinct from policy denials: a tool error means the tool was permitted but failed during execution. A policy denial means the tool was never called at all.
Variants§
InvalidArgument
A required argument was missing or had an invalid value.
ExecutionFailed(String)
The tool ran but encountered an error during execution.
Timeout
The tool did not complete within its allowed time.
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