pub enum BehaviorCondition {
Always,
LatencyThreshold {
endpoint: String,
threshold_ms: u64,
},
LoadPressure {
threshold_rps: f64,
},
PricingChange {
product_id: String,
threshold: f64,
},
FraudSuspicion {
user_id: String,
risk_score: f64,
},
CustomerSegment {
segment: String,
},
ErrorRate {
endpoint: String,
threshold: f64,
},
Composite {
operator: LogicalOp,
conditions: Vec<BehaviorCondition>,
},
}Expand description
Behavior condition
Conditions are evaluated to determine if a behavior rule should trigger. Conditions can be simple (single check) or composite (multiple conditions).
Variants§
Always
Always true (for testing or default behavior)
LatencyThreshold
Latency threshold condition
LoadPressure
Load pressure condition
PricingChange
Pricing change condition
FraudSuspicion
Fraud suspicion condition
CustomerSegment
Customer segment condition
ErrorRate
Error rate condition
Composite
Composite condition (multiple conditions with logical operator)
Trait Implementations§
Source§impl Clone for BehaviorCondition
impl Clone for BehaviorCondition
Source§fn clone(&self) -> BehaviorCondition
fn clone(&self) -> BehaviorCondition
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 BehaviorCondition
impl Debug for BehaviorCondition
Source§impl<'de> Deserialize<'de> for BehaviorCondition
impl<'de> Deserialize<'de> for BehaviorCondition
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 BehaviorCondition
impl RefUnwindSafe for BehaviorCondition
impl Send for BehaviorCondition
impl Sync for BehaviorCondition
impl Unpin for BehaviorCondition
impl UnsafeUnpin for BehaviorCondition
impl UnwindSafe for BehaviorCondition
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