#[non_exhaustive]pub enum RegistryError {
NotFound(String),
InvalidArguments(String),
Execution {
name: String,
source: ToolError,
},
}Expand description
Reasons a tool execution fails (registry level, defined by the framework).
All three failure classes are framework-component behavior, not
knowledge of user tools; the rich errors of user tools are already
finalized at the ToolError boundary and reachable via
RegistryError::Execution’s source().
Err’s Display is the “error-to-text”: the agent loop passes
e.to_string() back to the model as a ToolResult, and the text is
directly readable by the model.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound(String)
The tool is not registered.
InvalidArguments(String)
The model-provided arguments are invalid: not valid JSON, or valid
JSON with a mismatched structure (missing fields / wrong types,
rejected by the tool itself as
ToolError::InvalidArguments).
Execution
The tool execution failed; carries the tool name (for locating the failure with multiple tools, same as the panic path) and the source error.
Display starts with a single “tool error” prefix: the source error
(ToolError) itself carries no “tool” prefix, so concatenating
them yields exactly one “tool”, never a doubled prefix like
“tool error: tool …”.
Trait Implementations§
Source§impl Clone for RegistryError
impl Clone for RegistryError
Source§fn clone(&self) -> RegistryError
fn clone(&self) -> RegistryError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegistryError
impl Debug for RegistryError
Source§impl Display for RegistryError
impl Display for RegistryError
impl Eq for RegistryError
Source§impl Error for RegistryError
impl Error for RegistryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RegistryError
impl PartialEq for RegistryError
impl StructuralPartialEq for RegistryError
Auto Trait Implementations§
impl Freeze for RegistryError
impl RefUnwindSafe for RegistryError
impl Send for RegistryError
impl Sync for RegistryError
impl Unpin for RegistryError
impl UnsafeUnpin for RegistryError
impl UnwindSafe for RegistryError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.