pub struct EvaluationConfig {
pub arithmetic_nan_handling: NanHandling,
pub division_by_zero: DivisionByZeroHandling,
pub loose_equality_errors: bool,
pub truthy_evaluator: TruthyEvaluator,
pub numeric_coercion: NumericCoercionConfig,
}Expand description
Main configuration structure for DataLogic evaluation behavior
Fields§
§arithmetic_nan_handling: NanHandlingHow to handle NaN (Not a Number) in arithmetic operations
division_by_zero: DivisionByZeroHandlingHow to handle division by zero
loose_equality_errors: boolWhether to throw errors for incompatible types in loose equality
truthy_evaluator: TruthyEvaluatorHow to evaluate truthiness of values
numeric_coercion: NumericCoercionConfigConfiguration for numeric coercion behavior
Implementations§
Source§impl EvaluationConfig
impl EvaluationConfig
Sourcepub fn safe_arithmetic() -> Self
pub fn safe_arithmetic() -> Self
Create a configuration with safe arithmetic (ignores non-numeric values)
Sourcepub fn with_nan_handling(self, handling: NanHandling) -> Self
pub fn with_nan_handling(self, handling: NanHandling) -> Self
Builder method to set NaN handling
Sourcepub fn with_division_by_zero(self, handling: DivisionByZeroHandling) -> Self
pub fn with_division_by_zero(self, handling: DivisionByZeroHandling) -> Self
Builder method to set division by zero handling
Sourcepub fn with_loose_equality_errors(self, throw_errors: bool) -> Self
pub fn with_loose_equality_errors(self, throw_errors: bool) -> Self
Builder method to set loose equality error behavior
Sourcepub fn with_truthy_evaluator(self, evaluator: TruthyEvaluator) -> Self
pub fn with_truthy_evaluator(self, evaluator: TruthyEvaluator) -> Self
Builder method to set truthy evaluator
Sourcepub fn with_numeric_coercion(self, config: NumericCoercionConfig) -> Self
pub fn with_numeric_coercion(self, config: NumericCoercionConfig) -> Self
Builder method to set numeric coercion config
Trait Implementations§
Source§impl Clone for EvaluationConfig
impl Clone for EvaluationConfig
Source§fn clone(&self) -> EvaluationConfig
fn clone(&self) -> EvaluationConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EvaluationConfig
impl !RefUnwindSafe for EvaluationConfig
impl Send for EvaluationConfig
impl Sync for EvaluationConfig
impl Unpin for EvaluationConfig
impl UnsafeUnpin for EvaluationConfig
impl !UnwindSafe for EvaluationConfig
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