Skip to main content

CatalogRule

Trait CatalogRule 

Source
pub trait CatalogRule {
    // Required methods
    fn name(&self) -> &str;
    fn check(&self, def: &PermissionDef) -> Option<String>;
}
Expand description

Application-specific validation over each permission, run in CatalogBuilder::build alongside the structural validations.

Required Methods§

Source

fn name(&self) -> &str

Source

fn check(&self, def: &PermissionDef) -> Option<String>

Returns the error message if def violates the rule.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§