pub trait PdpResolver: Send + Sync {
// Required methods
fn dialect(&self) -> PdpDialect;
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 PdpCall,
bag: &'life2 AttributeBag,
) -> Pin<Box<dyn Future<Output = Result<PdpDecision, PdpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
External policy-decision dispatch. Implemented by Cedar, OPA HTTP clients, AuthZen clients, NeMo Guardrails — anything that can answer “given this call, allow or deny?” against a request context.
apl-cpex provides the bridge from CPEX plugins (e.g. cedar-direct)
to this trait so the host doesn’t have to know about the plugin types.
Required Methods§
Sourcefn dialect(&self) -> PdpDialect
fn dialect(&self) -> PdpDialect
What dialect this resolver handles. The evaluator routes PDP steps
to the resolver whose dialect() matches Step::Pdp.call.dialect.
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 PdpCall,
bag: &'life2 AttributeBag,
) -> Pin<Box<dyn Future<Output = Result<PdpDecision, PdpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".