pub fn compile_policy_with_entrypoint(
data: Value,
modules: &[PolicyModule],
entry_point_rule: Rc<str>,
) -> Result<CompiledPolicy>Expand description
Compiles a policy from data and modules with a specific entry point rule.
This is a convenience function that sets up an Engine and calls
Engine::compile_with_entrypoint. For more control over the compilation process
or to reuse an engine, use the engine method directly.
§Arguments
data- Static data to be available during policy evaluationmodules- Array of Rego policy modules to compile togetherentry_point_rule- The specific rule path to evaluate (e.g., “data.policy.allow”)
§Returns
Returns a CompiledPolicy focused on the specified entry point rule.
§See Also
Engine::compile_with_entrypointfor detailed documentation and examples- [
compile_policy_for_target] for target-aware compilation