pub enum BehaviorAction {
NoOp,
ModifyConversionRate {
multiplier: f64,
},
DeclineTransaction {
reason: String,
},
IncreaseChurnProbability {
factor: f64,
},
ChangeResponseStatus {
status: u16,
},
ModifyLatency {
adjustment_ms: i64,
},
TriggerChaosRule {
rule_name: String,
},
ModifyResponseBody {
path: String,
value: String,
},
}Expand description
Behavior action
Actions are executed when behavior conditions evaluate to true.
Variants§
NoOp
No operation (for testing or disabled rules)
ModifyConversionRate
Modify conversion rate
DeclineTransaction
Decline transaction
IncreaseChurnProbability
Increase churn probability
ChangeResponseStatus
Change response status code
ModifyLatency
Modify latency
TriggerChaosRule
Trigger chaos rule
ModifyResponseBody
Modify response body
Trait Implementations§
Source§impl Clone for BehaviorAction
impl Clone for BehaviorAction
Source§fn clone(&self) -> BehaviorAction
fn clone(&self) -> BehaviorAction
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 BehaviorAction
impl Debug for BehaviorAction
Source§impl<'de> Deserialize<'de> for BehaviorAction
impl<'de> Deserialize<'de> for BehaviorAction
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 BehaviorAction
impl RefUnwindSafe for BehaviorAction
impl Send for BehaviorAction
impl Sync for BehaviorAction
impl Unpin for BehaviorAction
impl UnsafeUnpin for BehaviorAction
impl UnwindSafe for BehaviorAction
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