pub struct FraudDetector { /* private fields */ }Expand description
Fraud pattern detector
Implementations§
Source§impl FraudDetector
impl FraudDetector
Sourcepub fn with_thresholds(thresholds: FraudThresholds) -> Self
pub fn with_thresholds(thresholds: FraudThresholds) -> Self
Create with custom thresholds
Sourcepub fn calculate_fraud_score(&mut self, transaction: &Transaction) -> FraudScore
pub fn calculate_fraud_score(&mut self, transaction: &Transaction) -> FraudScore
Calculate fraud score for transaction
Sourcepub fn cleanup_history(&mut self)
pub fn cleanup_history(&mut self)
Clear old history (keep last 24 hours)
Sourcepub fn get_transaction_count(&self, account: &str) -> usize
pub fn get_transaction_count(&self, account: &str) -> usize
Get transaction count for account
Sourcepub fn get_daily_total(&self, account: &str) -> f64
pub fn get_daily_total(&self, account: &str) -> f64
Get daily total for account
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FraudDetector
impl RefUnwindSafe for FraudDetector
impl Send for FraudDetector
impl Sync for FraudDetector
impl Unpin for FraudDetector
impl UnwindSafe for FraudDetector
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