#[non_exhaustive]pub struct EngineConfig {
pub observer: Option<Arc<dyn Observer>>,
pub error_context: Option<ErrorContext>,
pub condition_error_policy: ConditionErrorPolicy,
}Expand description
What an Engine is configured with beside its program. A reload,
Engine::with_program, keeps it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.observer: Option<Arc<dyn Observer>>The observer every run of the engine reports to, beside a run’s own
(RunOptions::observer). None by
default.
error_context: Option<ErrorContext>Where the records of each call that added any are mirrored in the
context, and how many are kept. None by default: nothing is
mirrored, and nothing is reset at run start.
condition_error_policy: ConditionErrorPolicyEngine-wide default for how condition evaluation errors are handled
when RunOptions::condition_error_policy is None. Defaults to
ConditionErrorPolicy::Skip.
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn error_context(self, ec: ErrorContext) -> Self
pub fn error_context(self, ec: ErrorContext) -> Self
Mirrors every run’s failure records by ec.
Sourcepub fn condition_error_policy(self, policy: ConditionErrorPolicy) -> Self
pub fn condition_error_policy(self, policy: ConditionErrorPolicy) -> Self
Sets the engine-wide default for how condition evaluation errors are handled.
Sourcepub fn with_condition_error_policy(self, policy: ConditionErrorPolicy) -> Self
pub fn with_condition_error_policy(self, policy: ConditionErrorPolicy) -> Self
Alias for Self::condition_error_policy.
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§impl Debug for EngineConfig
impl Debug for EngineConfig
Auto Trait Implementations§
impl !RefUnwindSafe for EngineConfig
impl !UnwindSafe for EngineConfig
impl Freeze for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin 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