pub struct DriftController { /* private fields */ }Expand description
Controller for computing and applying temporal drift.
Implementations§
Source§impl DriftController
impl DriftController
Sourcepub fn new(config: DriftConfig, seed: u64, total_periods: u32) -> Self
pub fn new(config: DriftConfig, seed: u64, total_periods: u32) -> Self
Create a new drift controller with the given configuration.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if drift is enabled.
Sourcepub fn compute_adjustments(&self, period: u32) -> DriftAdjustments
pub fn compute_adjustments(&self, period: u32) -> DriftAdjustments
Compute drift adjustments for a specific period (0-indexed).
Sourcepub fn sudden_drift_periods(&self) -> &[u32]
pub fn sudden_drift_periods(&self) -> &[u32]
Get the list of periods with sudden drift events.
Sourcepub fn config(&self) -> &DriftConfig
pub fn config(&self) -> &DriftConfig
Get the configuration.
Auto Trait Implementations§
impl Freeze for DriftController
impl RefUnwindSafe for DriftController
impl Send for DriftController
impl Sync for DriftController
impl Unpin for DriftController
impl UnwindSafe for DriftController
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