Skip to main content

policy

Macro policy 

Source
policy!() { /* proc-macro */ }
Expand description

Inline policy macro.

policy! {
    role Analyst {
        can [read, read_sensitive] on ["reports/*"];
    }
    role Engineer {
        can [read, write, execute] on ["code/*"];
    }
}

Expands each role X { ... } block to a struct + Role impl.