pub struct ConditionLimits {
pub max_path_depth: usize,
pub max_operators: usize,
pub max_string_length: usize,
}Expand description
Safety limits for condition evaluation in the trigger rule engine.
These limits prevent DoS attacks via maliciously crafted conditions (e.g., deeply nested JSON paths, excessive operators, or huge strings).
Fields§
§max_path_depth: usizeMaximum path depth for json_path_get().
Paths with more segments than this are rejected. Default: 10.
max_operators: usizeMaximum number of operators per condition object.
Conditions with more operators than this are rejected. Default: 20.
max_string_length: usizeMaximum string length (in bytes) for $contains operations.
Strings longer than this are rejected. Default: 10_000 (10 KB).
Trait Implementations§
Source§impl Clone for ConditionLimits
impl Clone for ConditionLimits
Source§fn clone(&self) -> ConditionLimits
fn clone(&self) -> ConditionLimits
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 Debug for ConditionLimits
impl Debug for ConditionLimits
Auto Trait Implementations§
impl Freeze for ConditionLimits
impl RefUnwindSafe for ConditionLimits
impl Send for ConditionLimits
impl Sync for ConditionLimits
impl Unpin for ConditionLimits
impl UnsafeUnpin for ConditionLimits
impl UnwindSafe for ConditionLimits
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