pub struct EngineConfig {
pub custom_rules: Vec<ExternalRuleSource>,
pub guard_rules: Vec<ExternalRuleSource>,
pub schema_validator_config: Option<SchemaValidatorConfig>,
}Fields§
§custom_rules: Vec<ExternalRuleSource>Engine-native custom rules (Rego or CEL depending on engine).
guard_rules: Vec<ExternalRuleSource>Guard DSL rules as raw source text, usable regardless of the selected engine.
schema_validator_config: Option<SchemaValidatorConfig>Optional schema validator configuration. A standalone engine derives its schema-aware rule metadata from this config. Language APIs also use it to construct the schema validator bundled with the engine, so both components observe the same additional schemas.
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn with_custom_rules(
self,
rules: impl IntoIterator<Item = ExternalRuleSource>,
) -> Self
pub fn with_custom_rules( self, rules: impl IntoIterator<Item = ExternalRuleSource>, ) -> Self
Adds engine-native custom rules (Rego or CEL, depending on the engine).
Sourcepub fn with_guard_rules(
self,
rules: impl IntoIterator<Item = ExternalRuleSource>,
) -> Self
pub fn with_guard_rules( self, rules: impl IntoIterator<Item = ExternalRuleSource>, ) -> Self
Adds Guard DSL rules, usable regardless of the selected engine.
Sourcepub fn with_schema_validator_config(self, config: SchemaValidatorConfig) -> Self
pub fn with_schema_validator_config(self, config: SchemaValidatorConfig) -> Self
Sets the nested schema validator configuration. When the engine is built
standalone via new(EngineConfig), it derives overlay-aware metadata from
the configured additional schemas.
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§impl Default for EngineConfig
impl Default for EngineConfig
Source§impl<'de> Deserialize<'de> for EngineConfig
impl<'de> Deserialize<'de> for EngineConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EngineConfig
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin for EngineConfig
impl UnwindSafe for EngineConfig
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