Skip to main content

PolicySource

Trait PolicySource 

Source
pub trait PolicySource:
    Send
    + Sync
    + 'static {
    // Required method
    fn fetch(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<PolicySet, String>> + Send + '_>>;
}
Expand description

External policy origin (rules file, OPA bundle endpoint, DB) — the app implements it; a background watcher feeds PolicyEngine::reload.

Required Methods§

Source

fn fetch( &self, ) -> Pin<Box<dyn Future<Output = Result<PolicySet, String>> + Send + '_>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§