pub struct PriceGenerator { /* private fields */ }Expand description
Price generator for simulating market movements.
Implementations§
Source§impl PriceGenerator
impl PriceGenerator
Sourcepub const fn new(model: PriceModel) -> Self
pub const fn new(model: PriceModel) -> Self
Creates a new price generator.
Sourcepub fn next_price(&mut self, current: Decimal) -> Decimal
pub fn next_price(&mut self, current: Decimal) -> Decimal
Generates the next price given the current price.
Trait Implementations§
Auto Trait Implementations§
impl Forget for PriceGenerator
impl Freeze for PriceGenerator
impl Move for PriceGenerator
impl RefUnwindSafe for PriceGenerator
impl Send for PriceGenerator
impl Sync for PriceGenerator
impl Unpin for PriceGenerator
impl UnsafeUnpin for PriceGenerator
impl UnwindSafe for PriceGenerator
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