Skip to main content

ApprovalDelegate

Trait ApprovalDelegate 

Source
pub trait ApprovalDelegate: Send + Sync {
    // Required method
    fn delegate_child_approval<'life0, 'async_trait>(
        &'life0 self,
        request: ChildApprovalRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ChildApprovalOutcome, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Late-bound delegate that routes a child’s approval request up to its parent.

Injected per-request on AgentLoopConfig exactly like GuardianSpawner; the trait lives in the engine, the implementation in the server (it owns the parent session store + pending-question + notification machinery).

Required Methods§

Source

fn delegate_child_approval<'life0, 'async_trait>( &'life0 self, request: ChildApprovalRequest, ) -> Pin<Box<dyn Future<Output = Result<ChildApprovalOutcome, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Register request on its parent (or auto-resolve by policy) and report what the child’s executor should do next.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§