Skip to main content

AgentInterrupter

Trait AgentInterrupter 

Source
pub trait AgentInterrupter: Send + Sync {
    // Required method
    fn interrupt(&self, session_id: &str) -> bool;
}
Expand description

Minimal boundary implemented by adk_runner::Runner::interrupt or another host.

Blanket-implemented for any Fn(&str) -> bool + Send + Sync, so a closure can be passed directly.

Required Methods§

Source

fn interrupt(&self, session_id: &str) -> bool

Interrupt the ADK session, returning whether an active run was cancelled.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> AgentInterrupter for F
where F: Fn(&str) -> bool + Send + Sync,