pub struct ImmunityMemory { /* private fields */ }Expand description
Immunity Memory - Persistent storage of learned attack patterns
Like biological immune memory, remembers past threats.
Implementations§
Source§impl ImmunityMemory
impl ImmunityMemory
Sourcepub fn record(&self, pattern: AttackPattern)
pub fn record(&self, pattern: AttackPattern)
Record a new attack pattern
Sourcepub fn get_pattern(&self, signature: &[u8; 32]) -> Option<AttackPattern>
pub fn get_pattern(&self, signature: &[u8; 32]) -> Option<AttackPattern>
Get pattern by signature
Sourcepub fn patterns_by_category(
&self,
category: AttackCategory,
) -> Vec<AttackPattern>
pub fn patterns_by_category( &self, category: AttackCategory, ) -> Vec<AttackPattern>
Get all patterns of a category
Sourcepub fn high_confidence_patterns(
&self,
min_confidence: f64,
) -> Vec<AttackPattern>
pub fn high_confidence_patterns( &self, min_confidence: f64, ) -> Vec<AttackPattern>
Get high-confidence patterns
Sourcepub fn pattern_count(&self) -> usize
pub fn pattern_count(&self) -> usize
Get total patterns stored
Sourcepub fn total_blocked(&self) -> u64
pub fn total_blocked(&self) -> u64
Get total blocked count
Sourcepub fn threat_statistics(&self) -> HashMap<AttackCategory, u64>
pub fn threat_statistics(&self) -> HashMap<AttackCategory, u64>
Get most common attack categories
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ImmunityMemory
impl !RefUnwindSafe for ImmunityMemory
impl Send for ImmunityMemory
impl Sync for ImmunityMemory
impl Unpin for ImmunityMemory
impl UnwindSafe for ImmunityMemory
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