pub struct ConfigBuilder { /* private fields */ }
Expand description
Builder for GeneratorConfig with fluent API
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn starting_price(self, price: Decimal) -> Self
pub fn starting_price(self, price: Decimal) -> Self
Sets the starting price
Sourcepub fn starting_price_f64(self, price: f64) -> Self
pub fn starting_price_f64(self, price: f64) -> Self
Sets the starting price from f64 (convenience method)
Sourcepub fn price_range(self, min: Decimal, max: Decimal) -> Self
pub fn price_range(self, min: Decimal, max: Decimal) -> Self
Sets the price boundaries
Sourcepub fn price_range_f64(self, min: f64, max: f64) -> Self
pub fn price_range_f64(self, min: f64, max: f64) -> Self
Sets the price boundaries from f64 (convenience method)
Sourcepub fn trend(self, direction: TrendDirection, strength: Decimal) -> Self
pub fn trend(self, direction: TrendDirection, strength: Decimal) -> Self
Sets the trend direction and strength
Sourcepub fn trend_f64(self, direction: TrendDirection, strength: f64) -> Self
pub fn trend_f64(self, direction: TrendDirection, strength: f64) -> Self
Sets the trend direction and strength from f64 (convenience method)
Sourcepub fn volatility(self, volatility: Decimal) -> Self
pub fn volatility(self, volatility: Decimal) -> Self
Sets the volatility
Sourcepub fn volatility_f64(self, volatility: f64) -> Self
pub fn volatility_f64(self, volatility: f64) -> Self
Sets the volatility from f64 (convenience method)
Sourcepub fn time_interval(self, interval: TimeInterval) -> Self
pub fn time_interval(self, interval: TimeInterval) -> Self
Sets the time interval
Sourcepub fn num_points(self, num: usize) -> Self
pub fn num_points(self, num: usize) -> Self
Sets the number of points to generate
Sourcepub fn base_volume(self, volume: u64) -> Self
pub fn base_volume(self, volume: u64) -> Self
Sets the base volume
Sourcepub fn volume_volatility(self, volatility: f64) -> Self
pub fn volume_volatility(self, volatility: f64) -> Self
Sets the volume volatility
Sourcepub fn build(self) -> Result<GeneratorConfig, ConfigError>
pub fn build(self) -> Result<GeneratorConfig, ConfigError>
Builds the configuration, validating all parameters
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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