pub struct DriftEvent {
pub sample_index: u64,
pub level: DriftLevel,
pub action: DriftAction,
pub detector_value: f64,
}Expand description
An immutable record of a single drift event.
Produced by DriftAwareModel
whenever the detector reports a change (warning or drift).
Fields§
§sample_index: u64The sample index at which the event was triggered (0-based).
level: DriftLevelThe drift level that triggered the event.
action: DriftActionThe action that was taken in response.
detector_value: f64The detector-specific value at the time of triggering (e.g. cumulative sum for Page-Hinkley, KS statistic for KSWIN). Useful for diagnostics.
Implementations§
Source§impl DriftEvent
impl DriftEvent
Sourcepub const fn new(
sample_index: u64,
level: DriftLevel,
action: DriftAction,
detector_value: f64,
) -> Self
pub const fn new( sample_index: u64, level: DriftLevel, action: DriftAction, detector_value: f64, ) -> Self
Create a new drift event record.
Trait Implementations§
Source§impl Clone for DriftEvent
impl Clone for DriftEvent
Source§fn clone(&self) -> DriftEvent
fn clone(&self) -> DriftEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DriftEvent
impl RefUnwindSafe for DriftEvent
impl Send for DriftEvent
impl Sync for DriftEvent
impl Unpin for DriftEvent
impl UnsafeUnpin for DriftEvent
impl UnwindSafe for DriftEvent
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