Skip to main content

ApprovalHandler

Trait ApprovalHandler 

Source
pub trait ApprovalHandler:
    Send
    + Sync
    + Debug {
    // Required methods
    fn request_approval<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 ApprovalRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ApprovalResult, ModuleError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn check_approval<'life0, 'life1, 'async_trait>(
        &'life0 self,
        approval_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ApprovalResult, ModuleError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for handling approval requests.

Required Methods§

Source

fn request_approval<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ApprovalRequest, ) -> Pin<Box<dyn Future<Output = Result<ApprovalResult, ModuleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Request approval for an operation. Returns the result.

Source

fn check_approval<'life0, 'life1, 'async_trait>( &'life0 self, approval_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ApprovalResult, ModuleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check the current status of a pending approval by ID.

Implementors§