pub trait ApprovalHandler: Send + Sync {
// Required method
fn request<'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
Host approval door (UI prompt). Must return a decision; an I/O error is surfaced as a denial with the error text (never fail-open).
Required Methods§
fn request<'life0, 'async_trait>(
&'life0 self,
request: ApprovalRequest,
) -> Pin<Box<dyn Future<Output = ApprovalDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".