Skip to main content

InterruptExt

Trait InterruptExt 

Source
pub trait InterruptExt {
    // Required methods
    fn resolve(&self, payload: impl Into<Value>) -> ResumeEntry;
    fn cancel(&self) -> ResumeEntry;
    fn is_tool_approval(&self) -> bool;
}
Expand description

Answering one interrupt, on the interrupt itself.

The protocol type lives in ag-ui-core, which has no opinion about consuming a run; these are the two things a client always does with one.

Required Methods§

Source

fn resolve(&self, payload: impl Into<Value>) -> ResumeEntry

Answers this interrupt with a payload.

Source

fn cancel(&self) -> ResumeEntry

Declines this interrupt.

Source

fn is_tool_approval(&self) -> bool

Whether the interrupt is asking to approve a specific tool call.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§