pub struct DriftDetector { /* private fields */ }Expand description
Drift detection engine
Implementations§
Source§impl DriftDetector
impl DriftDetector
Sourcepub fn with_config(config: DriftDetectionConfig) -> Self
pub fn with_config(config: DriftDetectionConfig) -> Self
Create a new drift detector with custom configuration
Sourcepub fn register_pattern(&mut self, pattern: LearnedPattern) -> Result<()>
pub fn register_pattern(&mut self, pattern: LearnedPattern) -> Result<()>
Register an established pattern
Sourcepub fn check_deviation(
&mut self,
decision: &ArchitecturalDecision,
pattern_type: &str,
) -> Result<Option<DriftDetection>>
pub fn check_deviation( &mut self, decision: &ArchitecturalDecision, pattern_type: &str, ) -> Result<Option<DriftDetection>>
Check if a decision deviates from established patterns
Sourcepub fn detect_inconsistency(
&mut self,
decision_id: &str,
expected_behavior: &str,
actual_behavior: &str,
) -> Result<DriftDetection>
pub fn detect_inconsistency( &mut self, decision_id: &str, expected_behavior: &str, actual_behavior: &str, ) -> Result<DriftDetection>
Detect inconsistencies in decision application
Sourcepub fn detect_violation(
&mut self,
decision_id: &str,
violation_description: &str,
) -> Result<DriftDetection>
pub fn detect_violation( &mut self, decision_id: &str, violation_description: &str, ) -> Result<DriftDetection>
Detect pattern violations
Sourcepub fn get_drifts(&self) -> Vec<DriftDetection>
pub fn get_drifts(&self) -> Vec<DriftDetection>
Get all detected drifts
Sourcepub fn get_drifts_by_severity(&self, severity: &str) -> Vec<DriftDetection>
pub fn get_drifts_by_severity(&self, severity: &str) -> Vec<DriftDetection>
Get drifts by severity
Sourcepub fn get_drifts_for_decision(&self, decision_id: &str) -> Vec<DriftDetection>
pub fn get_drifts_for_decision(&self, decision_id: &str) -> Vec<DriftDetection>
Get drifts for a specific decision
Sourcepub fn clear_drifts(&mut self)
pub fn clear_drifts(&mut self)
Clear all detected drifts
Sourcepub fn get_statistics(&self) -> DriftStatistics
pub fn get_statistics(&self) -> DriftStatistics
Get drift statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DriftDetector
impl RefUnwindSafe for DriftDetector
impl Send for DriftDetector
impl Sync for DriftDetector
impl Unpin for DriftDetector
impl UnwindSafe for DriftDetector
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