pub enum ToolError {
InvalidInput {
message: String,
},
MissingField {
field: String,
},
PathEscape {
path: PathBuf,
},
ExecutionFailed {
message: String,
},
Timeout {
seconds: u64,
},
NotAvailable {
message: String,
},
PermissionDenied {
message: String,
},
}Expand description
Errors that can occur during tool execution.
Variants§
Implementations§
Source§impl ToolError
impl ToolError
pub fn invalid_input(msg: impl Into<String>) -> Self
pub fn missing_field(field: impl Into<String>) -> Self
pub fn execution_failed(msg: impl Into<String>) -> Self
pub fn path_escape(path: impl Into<PathBuf>) -> Self
pub fn not_available(msg: impl Into<String>) -> Self
pub fn permission_denied(msg: impl Into<String>) -> Self
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