pub trait ApprovalHandler:
Send
+ Sync
+ Debug {
// Required method
fn ask<'life0, 'async_trait>(
&'life0 self,
request: ApprovalRequest,
) -> Pin<Box<dyn Future<Output = ApprovalDecision> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler invoked when a tool call requires explicit human approval.
Required Methods§
Sourcefn ask<'life0, 'async_trait>(
&'life0 self,
request: ApprovalRequest,
) -> Pin<Box<dyn Future<Output = ApprovalDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ask<'life0, 'async_trait>(
&'life0 self,
request: ApprovalRequest,
) -> Pin<Box<dyn Future<Output = ApprovalDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Present the request to the user/host and return their decision.