pub enum ToolOutcome {
Success,
Error,
PermissionRejected,
PermissionCancelled,
Followup,
HookDenied,
InvalidTool,
Cancelled,
}Expand description
Fine-grained outcome of a tool invocation lifecycle.
Mirrors the outcome taxonomy used by the runtime: status remains the
coarse lifecycle signal (Completed / Failed / InProgress), while
outcome captures why the invocation terminated. Consumers that only
need success/failure can continue to read status; analytics and the UI
layer use outcome for richer classification.
Variants§
Success
Tool executed and returned a result.
Error
Tool executed but returned an error.
PermissionRejected
User rejected the permission prompt.
PermissionCancelled
User cancelled the permission prompt (e.g. Ctrl+C / Esc).
Followup
User provided a followup message instead of approving.
HookDenied
A user-configured hook blocked execution.
InvalidTool
Tool not found or arguments couldn’t be parsed.
Cancelled
Tool was cancelled during execution or closed before dispatch when its turn ended.
Implementations§
Source§impl ToolOutcome
impl ToolOutcome
pub const fn is_terminal(self) -> bool
Trait Implementations§
Source§impl Clone for ToolOutcome
impl Clone for ToolOutcome
impl Copy for ToolOutcome
Source§impl Debug for ToolOutcome
impl Debug for ToolOutcome
Source§impl Default for ToolOutcome
impl Default for ToolOutcome
Source§impl<'de> Deserialize<'de> for ToolOutcome
impl<'de> Deserialize<'de> for ToolOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ToolOutcome
Source§impl JsonSchema for ToolOutcome
impl JsonSchema for ToolOutcome
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ToolOutcome
impl PartialEq for ToolOutcome
Source§impl Serialize for ToolOutcome
impl Serialize for ToolOutcome
impl StructuralPartialEq for ToolOutcome
Auto Trait Implementations§
impl Freeze for ToolOutcome
impl RefUnwindSafe for ToolOutcome
impl Send for ToolOutcome
impl Sync for ToolOutcome
impl Unpin for ToolOutcome
impl UnsafeUnpin for ToolOutcome
impl UnwindSafe for ToolOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.