#[non_exhaustive]pub enum ToolError {
Denied(String),
NotFound(String),
Validation(String),
Execution(Error),
Cancelled,
Timeout(Duration),
InvalidInput(String),
Io(Error),
Schema(Error),
Transport(Error),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Denied(String)
NotFound(String)
Validation(String)
Execution(Error)
Cancelled
Timeout(Duration)
InvalidInput(String)
Io(Error)
Schema(Error)
Transport(Error)
Implementations§
Trait Implementations§
Source§impl Error for ToolError
impl Error for ToolError
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<ExecError> for ToolError
The three sentences of ExecError, said in the vocabulary a tool result
speaks.
impl From<ExecError> for ToolError
The three sentences of ExecError, said in the vocabulary a tool result
speaks.
Collapsing them would cost the host the one case it can act on: a
Denied is the model’s to work around, a Failed is the target’s own
words, and an Unavailable is neither — it keeps its own prefix so that a
deployment whose execution environment is down reads as a broken
environment rather than as a tool the model used wrongly.
Auto Trait Implementations§
impl !RefUnwindSafe for ToolError
impl !UnwindSafe for ToolError
impl Forget for ToolError
impl Freeze for ToolError
impl Move for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin for ToolError
impl UnsafeUnpin 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