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 running when the turn was cancelled.
Implementations§
Source§impl ToolOutcome
impl ToolOutcome
pub const fn is_terminal(self) -> bool
Trait Implementations§
Source§impl Clone for ToolOutcome
impl Clone for ToolOutcome
Source§fn clone(&self) -> ToolOutcome
fn clone(&self) -> ToolOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ToolOutcome
Source§impl Debug for ToolOutcome
impl Debug for ToolOutcome
Source§impl Default for ToolOutcome
impl Default for ToolOutcome
Source§fn default() -> ToolOutcome
fn default() -> ToolOutcome
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
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>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.