pub enum ToolExecutionError {
TimedOut,
Cancelled,
UnknownTool(String),
Unavailable(String),
Protocol(String),
}Expand description
Single-call failure inside a source. The executor’s tool adapter
(ToolBridge in causa_runtime) turns every variant into a structured
tool result the model reads; the status mapping lives there, not here.
A source that can report what happened returns Ok with the matching
ToolResultStatus,
including TimedOut or Cancelled with any partial output. The timeout
and cancellation variants below mean the source observed no result at
all: the bridge records
UnknownOutcome.
Exhaustive on purpose: the runtime maps every variant to a result status, so a new one is a breaking change.
Variants§
TimedOut
No result was observed before the call’s time budget ran out. A source
that can report a timeout returns Ok with a
TimedOut
result carrying any partial output instead; this error maps to
UnknownOutcome.
Cancelled
No result was observed because the call was cancelled. A source whose
tool reports its own cancellation returns Ok with a
Cancelled
result carrying any partial output instead; this error maps to
UnknownOutcome.
UnknownTool(String)
The name is not in this source’s namespace.
Connection failure or server offline (transient).
Protocol(String)
Protocol-level failure (permanent).
Trait Implementations§
Source§impl Clone for ToolExecutionError
impl Clone for ToolExecutionError
Source§impl Debug for ToolExecutionError
impl Debug for ToolExecutionError
Source§impl Display for ToolExecutionError
impl Display for ToolExecutionError
impl Eq 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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()