Skip to main content

Module engine

Module engine 

Source
Expand description

The engines this build compiles a policy document with, and the tree built from them.

Structs§

CedarLanguage
The didbot-policy-records::compile::Language bridge for "cedar": hands back a fresh CedarEvaluator over this server’s shapes per predicate document.
CountLanguage
The didbot-policy-records::compile::Language bridge for "count": hands back a fresh CountEvaluator per predicate document. The counts themselves are the process’s, not the evaluator’s, so a tree rebuilt on a poll tick keeps counting where the last one left off – see didbot-policy-count’s own doc comment.
Engine
One engine this build carries.
RegexLanguage
The didbot-policy-records::compile::Language bridge for "regex": hands back a fresh, not-yet-compiled RegexEvaluator per predicate document. The actual compiling — parsing didbot-policy-regex’s own JSON predicate schema, documented on RegexEvaluator::compile_json — happens inside didbot_policy::Evaluator::compile itself: this bridge’s only job is naming which evaluator crate answers to "regex" for an operator’s record. The built-ins in crate::builtin compile their own statements with the same crate and never pass through here.

Constants§

ENGINES
Every engine this build carries. A language no entry names is one crate::compile treats as didbot_policy::Predicate::Unusable, the fail-closed, scoped treatment an unrecognised language gets.

Functions§

build_tree
Assembles one PolicyTree from every source a deployment carries.
engine_for
The engine that reads a document of this $type, if this build carries one.
shapes
The record shapes this server validates Cedar documents against and types context.value with. One set, shared by every evaluator and by the loader that splits a document into statements, so both see the same schema.