pub enum ToolExecutionError {
Cancelled,
Infrastructure {
message: String,
},
}Expand description
Infrastructure-level errors raised by tool executors.
Use this for cancellation or infrastructure failures only. If the tool ran
and produced a domain-level failure, return a failed ToolExecutionOutcome
instead.
Variants§
Cancelled
Tool execution was cancelled cooperatively.
Infrastructure
Tool execution could not complete because the executor infrastructure failed.
Implementations§
Source§impl ToolExecutionError
impl ToolExecutionError
Sourcepub fn infrastructure(message: impl Into<String>) -> Self
pub fn infrastructure(message: impl Into<String>) -> Self
Creates an infrastructure error.
Infrastructure errors leave the pending tool call unresolved.
Trait Implementations§
Source§impl Debug for ToolExecutionError
impl Debug for ToolExecutionError
Source§impl Display for ToolExecutionError
impl Display for ToolExecutionError
Source§impl Error for ToolExecutionError
impl Error for ToolExecutionError
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 Forget for ToolExecutionError
impl Freeze for ToolExecutionError
impl Move for ToolExecutionError
impl RefUnwindSafe for ToolExecutionError
impl Send for ToolExecutionErrorwhere
RawVecInner: Send,
impl Sync for ToolExecutionErrorwhere
RawVecInner: Sync,
impl Unpin for ToolExecutionError
impl UnsafeUnpin for ToolExecutionError
impl UnwindSafe for ToolExecutionErrorwhere
RawVecInner: UnwindSafe,
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