pub struct RegoEngine { /* private fields */ }Implementations§
Source§impl RegoEngine
impl RegoEngine
pub fn new(config: EngineConfig) -> Result<Self>
Sourcepub fn new_external_only(config: EngineConfig) -> Result<Self>
pub fn new_external_only(config: EngineConfig) -> Result<Self>
Constructs an engine that evaluates only the caller-supplied custom and Guard rules, without loading or advertising the handwritten built-in policies. Embedded data tables and custom builtins remain available so external rules can call them.
This backs the composite engine, whose built-in rules are owned by a separate engine; loading them here too would double-evaluate them.
Trait Implementations§
Source§impl ValidationEngine for RegoEngine
impl ValidationEngine for RegoEngine
Source§fn external_rule_metadata(&self) -> HashMap<String, RuleMetadataEntry>
fn external_rule_metadata(&self) -> HashMap<String, RuleMetadataEntry>
Returns Guard rule metadata merged with any custom Rego rule metadata discovered from prior evaluations. Custom diagnostics already carry their current evaluation’s rule description, so this accumulated metadata cannot overwrite a later report.
fn engine_name(&self) -> &str
fn evaluate_rules( &self, model: &Arc<SemanticModel>, config: &ValidateConfig, ) -> Result<Vec<Diagnostic>, ValidationError>
fn list_rules(&self) -> Vec<RuleInfo>
Source§fn rule_metadata(&self) -> &HashMap<String, RuleMetadataEntry>
fn rule_metadata(&self) -> &HashMap<String, RuleMetadataEntry>
Built-in rule metadata from the rules registry only.
fn init_metric(&self) -> &PhaseMetric
Auto Trait Implementations§
impl !Freeze for RegoEngine
impl !RefUnwindSafe for RegoEngine
impl !UnwindSafe for RegoEngine
impl Send for RegoEngine
impl Sync for RegoEngine
impl Unpin for RegoEngine
impl UnsafeUnpin for RegoEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more