pub struct AnomalyInjectorConfigBuilder { /* private fields */ }Expand description
Builder for AnomalyInjectorConfig.
Implementations§
Source§impl AnomalyInjectorConfigBuilder
impl AnomalyInjectorConfigBuilder
Sourcepub fn with_total_rate(self, rate: f64) -> Self
pub fn with_total_rate(self, rate: f64) -> Self
Sets the total anomaly rate.
Sourcepub fn with_fraud_rate(self, rate: f64) -> Self
pub fn with_fraud_rate(self, rate: f64) -> Self
Sets the fraud rate (proportion of anomalies).
Sourcepub fn with_error_rate(self, rate: f64) -> Self
pub fn with_error_rate(self, rate: f64) -> Self
Sets the error rate (proportion of anomalies).
Sourcepub fn with_temporal_pattern(self, pattern: TemporalPattern) -> Self
pub fn with_temporal_pattern(self, pattern: TemporalPattern) -> Self
Sets the temporal pattern.
Sourcepub fn with_labels(self, generate: bool) -> Self
pub fn with_labels(self, generate: bool) -> Self
Enables or disables label generation.
Sourcepub fn with_target_companies(self, companies: Vec<String>) -> Self
pub fn with_target_companies(self, companies: Vec<String>) -> Self
Sets target companies.
Sourcepub fn with_date_range(self, start: NaiveDate, end: NaiveDate) -> Self
pub fn with_date_range(self, start: NaiveDate, end: NaiveDate) -> Self
Sets the date range.
Sourcepub fn build(self) -> AnomalyInjectorConfig
pub fn build(self) -> AnomalyInjectorConfig
Builds the configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnomalyInjectorConfigBuilder
impl RefUnwindSafe for AnomalyInjectorConfigBuilder
impl Send for AnomalyInjectorConfigBuilder
impl Sync for AnomalyInjectorConfigBuilder
impl Unpin for AnomalyInjectorConfigBuilder
impl UnwindSafe for AnomalyInjectorConfigBuilder
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