Skip to main content

Module record

Module record 

Source
Expand description

The declaration one policy statement becomes between the operator’s record and didbot_policy::PolicyDeclaration.

crate::set::declarations reads a bot.did.policy record and produces one ParsedPolicy per statement per action the statement can decide. crate::compile takes it from there, resolving language against the evaluators this build carries and registering the result on a tree.

§Applicability is declarative data, outside the predicate

The core validates applicability at its boundary and builds the tree from it, so a policy whose applicability is known-good can be scoped even when its predicate cannot be used – see didbot_policy::Predicate’s own doc comment. predicate is opaque JSON here: only the evaluator named by language reads it, and only that evaluator can say whether its own syntax is well formed. That split is why crate::compile is a separate step.

Structs§

ParsedPolicy
One policy statement, ready to compile.