Skip to main content

compile_policies

Function compile_policies 

Source
pub fn compile_policies<'a>(
    records: impl IntoIterator<Item = (&'a str, &'a ParsedPolicy)>,
    languages: &[&dyn Language],
    builder: &mut PolicyTreeBuilder,
) -> CompileReport
Expand description

Registers every policy in records against builder, in records’ iteration order – callers wanting a specific presentational order (see plan/policy.md’s “order is presentational, not semantic”) should pass an already-ordered sequence.

Precedence is not this function’s concern: it registers every source’s policies into the same tree with no source privileged over another, because plan/policy.md’s deny-only monotonicity already makes that correct – see this crate’s top-level doc comment for why no precedence engine belongs here.