pub struct PatternDetector {
pub action_log: Vec<String>,
/* private fields */
}Fields§
§action_log: Vec<String>Implementations§
Source§impl PatternDetector
impl PatternDetector
pub fn new(db: Connection, retention_days: u32) -> Self
pub fn record_action(&mut self, action: &str)
pub fn detect_patterns(&mut self) -> Vec<DetectedPattern>
pub fn accept_pattern(&self, pattern_id: &str) -> Result<String, PatternError>
pub fn decline_pattern(&self, pattern_id: &str) -> Result<(), PatternError>
pub fn reset_declined(&self) -> Result<u64, PatternError>
pub fn list_patterns(&self) -> Result<Vec<PatternRecord>, PatternError>
pub fn cleanup_expired(&self) -> Result<u64, PatternError>
Auto Trait Implementations§
impl !Freeze for PatternDetector
impl !RefUnwindSafe for PatternDetector
impl Send for PatternDetector
impl !Sync for PatternDetector
impl Unpin for PatternDetector
impl UnsafeUnpin for PatternDetector
impl !UnwindSafe for PatternDetector
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more