Skip to main content

InterruptResolver

Trait InterruptResolver 

Source
pub trait InterruptResolver: Send + Sync {
    // Required method
    fn resolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        state: &'life1 RunState,
        interruption: &'life2 Interruption,
    ) -> Pin<Box<dyn Future<Output = Option<Resolution>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Settles interruptions inside Agent::run_resolving: a clean-check verifier, an approval UI, a policy. None leaves the run interrupted.

It is offered every interruption, whichever hook raised it: return None for interruptions you do not own (check the reason, for example with crate::is_untrusted_egress).

Required Methods§

Source

fn resolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 RunState, interruption: &'life2 Interruption, ) -> Pin<Box<dyn Future<Output = Option<Resolution>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§