pub struct TestAndon { /* private fields */ }Expand description
Silent Andon handler for testing that collects events.
Does not log or panic, just records events for inspection.
Implementations§
Source§impl TestAndon
impl TestAndon
Sourcepub fn events(&self) -> Vec<AndonEvent>
pub fn events(&self) -> Vec<AndonEvent>
Get collected events.
Sourcepub fn was_halted(&self) -> bool
pub fn was_halted(&self) -> bool
Check if halt was triggered.
Sourcepub fn count_high_rejection(&self) -> usize
pub fn count_high_rejection(&self) -> usize
Count events of a specific type.
Sourcepub fn count_quality_drift(&self) -> usize
pub fn count_quality_drift(&self) -> usize
Count quality drift events.
Trait Implementations§
Source§impl AndonHandler for TestAndon
impl AndonHandler for TestAndon
Source§fn on_event(&self, event: &AndonEvent)
fn on_event(&self, event: &AndonEvent)
Called when an Andon event occurs.
Source§fn should_halt(&self, event: &AndonEvent) -> bool
fn should_halt(&self, event: &AndonEvent) -> bool
Determine if pipeline should halt for this event.
Source§fn on_high_rejection(&self, rate: f32, threshold: f32)
fn on_high_rejection(&self, rate: f32, threshold: f32)
Called when high rejection rate is detected.
Source§fn on_quality_drift(&self, current: f32, baseline: f32)
fn on_quality_drift(&self, current: f32, baseline: f32)
Called when quality drifts below baseline.
Source§fn on_diversity_collapse(&self, score: f32, minimum: f32)
fn on_diversity_collapse(&self, score: f32, minimum: f32)
Called when diversity collapses.
Auto Trait Implementations§
impl !Freeze for TestAndon
impl RefUnwindSafe for TestAndon
impl Send for TestAndon
impl Sync for TestAndon
impl Unpin for TestAndon
impl UnsafeUnpin for TestAndon
impl UnwindSafe for TestAndon
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