Skip to main content

GatePolicySource

Trait GatePolicySource 

Source
pub trait GatePolicySource:
    Send
    + Sync
    + Debug {
    // Required method
    fn load(&self, name: &str) -> Result<GatePolicy, String>;
}
Expand description

Where named gate policies come from. A declaration names a policy; the source resolves it. Policies are immutable per name — re-running a gate must mean re-reading the same rule, so a source that edits in place breaks the audit the gate journals.

Required Methods§

Source

fn load(&self, name: &str) -> Result<GatePolicy, String>

Load policy name (Err when unknown).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§