pub struct SpoofingEngine { /* private fields */ }Expand description
Spoofing engine for adversarial mode.
Spoofing makes suspicious transactions appear more legitimate by:
- Aligning timing to customer’s normal cadence
- Sampling amounts from customer’s historical distribution
- Using merchant categories consistent with persona
- Adjusting velocity to match baseline behavior
- Adding longer dwell times to avoid detection
Implementations§
Source§impl SpoofingEngine
impl SpoofingEngine
Sourcepub fn new(config: SpoofingConfig, seed: u64) -> Self
pub fn new(config: SpoofingConfig, seed: u64) -> Self
Create a new spoofing engine.
Sourcepub fn apply(&mut self, txn: &mut BankTransaction, customer: &BankingCustomer)
pub fn apply(&mut self, txn: &mut BankTransaction, customer: &BankingCustomer)
Apply spoofing to a transaction.
Sourcepub fn calculate_effectiveness(
&self,
txn: &BankTransaction,
customer: &BankingCustomer,
) -> f64
pub fn calculate_effectiveness( &self, txn: &BankTransaction, customer: &BankingCustomer, ) -> f64
Calculate spoofing effectiveness score.
Auto Trait Implementations§
impl Freeze for SpoofingEngine
impl RefUnwindSafe for SpoofingEngine
impl Send for SpoofingEngine
impl Sync for SpoofingEngine
impl Unpin for SpoofingEngine
impl UnwindSafe for SpoofingEngine
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