Skip to main content

ApprovalPrompter

Trait ApprovalPrompter 

Source
pub trait ApprovalPrompter: Send + Sync {
    // Required methods
    fn prompt(&self, request: &PermissionRequest) -> AuthorizationResponse;
    fn name(&self) -> &'static str;
}
Expand description

Trait for approval prompt implementations

Implement this to create custom approval UX.

Required Methods§

Source

fn prompt(&self, request: &PermissionRequest) -> AuthorizationResponse

Prompt the user and return their choice

Source

fn name(&self) -> &'static str

Human-readable name for this prompter

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§