pub trait Authorizer:
Send
+ Sync
+ Debug {
// Required method
fn authorize<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
command_path: &'life1 str,
args: &'life2 ValueMap,
credential: Option<&'life3 Credential>,
reason: &'life4 str,
tier: Tier,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}Expand description
Authorization hook called after credential resolution and before business logic.
Required Methods§
Verifies whether command_path may run with the provided args, reason, and tier.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".