Skip to main content

InterruptPayload

Trait InterruptPayload 

Source
pub trait InterruptPayload:
    Send
    + Sync
    + Debug {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn display_output(&self) -> String;
}
Expand description

Typed payload for ToolResult::Interrupt.

Tools define concrete structs implementing this trait. The CLI/UI layer downcasts via as_any to handle each type specifically.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Downcast support — return self as &dyn Any.

Source

fn display_output(&self) -> String

Human-readable description of the interrupt, used as the tool result string in the conversation so the LLM knows what happened.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§