pub struct BehavioralAnalytics { /* private fields */ }Expand description
Behavioral analytics engine
Implementations§
Source§impl BehavioralAnalytics
impl BehavioralAnalytics
Sourcepub fn analyze(&mut self, log: &LogEntry) -> Option<ThreatAlert>
pub fn analyze(&mut self, log: &LogEntry) -> Option<ThreatAlert>
Analyze log for behavioral anomalies
Sourcepub fn get_user_profile(&self, user_id: &str) -> Option<&UserProfile>
pub fn get_user_profile(&self, user_id: &str) -> Option<&UserProfile>
Get user profile
Sourcepub fn get_all_profiles(&self) -> Vec<&UserProfile>
pub fn get_all_profiles(&self) -> Vec<&UserProfile>
Get all user profiles
Sourcepub fn get_high_risk_users(&self, min_failed_logins: usize) -> Vec<&UserProfile>
pub fn get_high_risk_users(&self, min_failed_logins: usize) -> Vec<&UserProfile>
Get high-risk users (those with many anomalies)
Sourcepub fn clear_old_profiles(&mut self, before: DateTime<Utc>)
pub fn clear_old_profiles(&mut self, before: DateTime<Utc>)
Clear old profiles to manage memory
Auto Trait Implementations§
impl Freeze for BehavioralAnalytics
impl RefUnwindSafe for BehavioralAnalytics
impl Send for BehavioralAnalytics
impl Sync for BehavioralAnalytics
impl Unpin for BehavioralAnalytics
impl UnwindSafe for BehavioralAnalytics
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