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 new() -> EngineConfig
pub fn new() -> EngineConfig
Starts from the default configuration.
Sourcepub fn with_custom_rules(
self,
rules: impl IntoIterator<Item = ExternalRuleSource>,
) -> EngineConfig
pub fn with_custom_rules( self, rules: impl IntoIterator<Item = ExternalRuleSource>, ) -> EngineConfig
Adds engine-native custom rules (Rego or CEL, depending on the engine).
Sourcepub fn with_guard_rules(
self,
rules: impl IntoIterator<Item = ExternalRuleSource>,
) -> EngineConfig
pub fn with_guard_rules( self, rules: impl IntoIterator<Item = ExternalRuleSource>, ) -> EngineConfig
Adds Guard DSL rules, usable regardless of the selected engine.
Sourcepub fn with_schema_validator_config(
self,
config: SchemaValidatorConfig,
) -> EngineConfig
pub fn with_schema_validator_config( self, config: SchemaValidatorConfig, ) -> EngineConfig
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§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for EngineConfig
impl Default for EngineConfig
Source§fn default() -> EngineConfig
fn default() -> EngineConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EngineConfig
impl<'de> Deserialize<'de> for EngineConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EngineConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EngineConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EngineConfig
impl Serialize for EngineConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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