pub struct LoopPreventionEngine { /* private fields */ }Expand description
Main loop prevention engine
Implementations§
Source§impl LoopPreventionEngine
impl LoopPreventionEngine
pub fn new(config: LoopPreventionConfig) -> Self
Sourcepub fn validate_insight(
&mut self,
insight: &Insight,
) -> Result<LoopDetectionResult>
pub fn validate_insight( &mut self, insight: &Insight, ) -> Result<LoopDetectionResult>
Validate insight and check for loops before acceptance
Sourcepub fn register_insight(
&mut self,
insight: &Insight,
quality: QualityAssessment,
) -> Result<()>
pub fn register_insight( &mut self, insight: &Insight, quality: QualityAssessment, ) -> Result<()>
Register a validated insight in the tracking system
Sourcepub fn calculate_diversity_adjustment(&self, insight_type: &InsightType) -> f64
pub fn calculate_diversity_adjustment(&self, insight_type: &InsightType) -> f64
Apply diversity bonuses and repetition penalties
Sourcepub fn get_prevention_statistics(&self) -> PreventionStatistics
pub fn get_prevention_statistics(&self) -> PreventionStatistics
Get statistics about current prevention state
Auto Trait Implementations§
impl Freeze for LoopPreventionEngine
impl RefUnwindSafe for LoopPreventionEngine
impl Send for LoopPreventionEngine
impl Sync for LoopPreventionEngine
impl Unpin for LoopPreventionEngine
impl UnwindSafe for LoopPreventionEngine
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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