pub enum InjectionStrategy {
Show 14 variants
AmountManipulation {
original: Decimal,
factor: f64,
},
ThresholdAvoidance {
threshold: Decimal,
adjusted_amount: Decimal,
},
DateShift {
days_shifted: i32,
original_date: NaiveDate,
},
SelfApproval {
user_id: String,
},
SoDViolation {
duty1: String,
duty2: String,
violating_user: String,
},
ExactDuplicate {
original_doc_id: String,
},
NearDuplicate {
original_doc_id: String,
varied_fields: Vec<String>,
},
CircularFlow {
entity_chain: Vec<String>,
},
SplitTransaction {
original_amount: Decimal,
split_count: u32,
split_doc_ids: Vec<String>,
},
RoundNumbering {
original_amount: Decimal,
rounded_amount: Decimal,
},
TimingManipulation {
timing_type: String,
original_time: Option<NaiveDateTime>,
},
AccountMisclassification {
correct_account: String,
incorrect_account: String,
},
MissingField {
field_name: String,
},
Custom {
name: String,
parameters: HashMap<String, String>,
},
}Expand description
Structured injection strategy with captured parameters.
Unlike the string-based injection_strategy field, this enum captures
the exact parameters used during injection for full reproducibility.
Variants§
AmountManipulation
Amount was manipulated by a factor.
Fields
ThresholdAvoidance
Amount adjusted to avoid a threshold.
Fields
DateShift
Date was backdated or forward-dated.
Fields
SelfApproval
User approved their own transaction.
SoDViolation
Segregation of duties violation.
Fields
ExactDuplicate
Exact duplicate of another document.
NearDuplicate
Near-duplicate with small variations.
Fields
CircularFlow
Circular flow of funds/goods.
SplitTransaction
Split transaction to avoid threshold.
Fields
RoundNumbering
Round number manipulation.
TimingManipulation
Timing manipulation (weekend, after-hours, etc.).
Fields
original_time: Option<NaiveDateTime>Original timestamp.
AccountMisclassification
Account misclassification.
MissingField
Missing required field.
Custom
Custom injection strategy.
Implementations§
Source§impl InjectionStrategy
impl InjectionStrategy
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Returns a human-readable description of the strategy.
Sourcepub fn strategy_type(&self) -> &'static str
pub fn strategy_type(&self) -> &'static str
Returns the strategy type name.
Trait Implementations§
Source§impl Clone for InjectionStrategy
impl Clone for InjectionStrategy
Source§fn clone(&self) -> InjectionStrategy
fn clone(&self) -> InjectionStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InjectionStrategy
impl Debug for InjectionStrategy
Source§impl<'de> Deserialize<'de> for InjectionStrategy
impl<'de> Deserialize<'de> for InjectionStrategy
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>,
Source§impl PartialEq for InjectionStrategy
impl PartialEq for InjectionStrategy
Source§fn eq(&self, other: &InjectionStrategy) -> bool
fn eq(&self, other: &InjectionStrategy) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for InjectionStrategy
impl Serialize for InjectionStrategy
impl StructuralPartialEq for InjectionStrategy
Auto Trait Implementations§
impl Freeze for InjectionStrategy
impl RefUnwindSafe for InjectionStrategy
impl Send for InjectionStrategy
impl Sync for InjectionStrategy
impl Unpin for InjectionStrategy
impl UnsafeUnpin for InjectionStrategy
impl UnwindSafe for InjectionStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.