pub enum FunctionCallError {
ToolNotFound {
name: String,
},
KindMismatch {
expected: ToolKind,
got: ToolKind,
},
MutatingToolRejected {
name: String,
},
TimedOut {
name: String,
timeout_ms: u64,
},
Cancelled {
name: String,
},
ExecutionFailed {
name: String,
error: String,
},
}Expand description
Errors that can occur during tool dispatch and execution.
Unlike ToolError, which represents input validation failures within
a tool, FunctionCallError covers problems at the dispatch layer: the
tool was not found, its kind did not match, it was rejected because it
is mutating, it timed out, was cancelled, or its handler returned an
error.
Variants§
ToolNotFound
No tool with the given name is registered.
KindMismatch
The payload kind does not match the handler’s expected kind.
MutatingToolRejected
The tool is mutating but allow_mutating was false.
TimedOut
The tool execution exceeded its configured timeout.
Cancelled
The tool execution was cancelled.
ExecutionFailed
The tool handler returned an error.
Trait Implementations§
Source§impl Clone for FunctionCallError
impl Clone for FunctionCallError
Source§fn clone(&self) -> FunctionCallError
fn clone(&self) -> FunctionCallError
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 FunctionCallError
impl Debug for FunctionCallError
Source§impl<'de> Deserialize<'de> for FunctionCallError
impl<'de> Deserialize<'de> for FunctionCallError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FunctionCallError
impl RefUnwindSafe for FunctionCallError
impl Send for FunctionCallError
impl Sync for FunctionCallError
impl Unpin for FunctionCallError
impl UnsafeUnpin for FunctionCallError
impl UnwindSafe for FunctionCallError
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