pub struct RegimeChange {
pub period: u32,
pub change_type: RegimeChangeType,
pub description: Option<String>,
pub effects: Vec<RegimeEffect>,
pub transition_periods: u32,
}Expand description
A single regime change event.
Fields§
§period: u32Period when the change occurs (0-indexed)
change_type: RegimeChangeTypeType of regime change
description: Option<String>Description of the change
effects: Vec<RegimeEffect>Custom effects (only used if change_type is Custom)
transition_periods: u32Transition duration in periods (0 = immediate, >0 = gradual)
Implementations§
Source§impl RegimeChange
impl RegimeChange
Sourcepub fn new(period: u32, change_type: RegimeChangeType) -> Self
pub fn new(period: u32, change_type: RegimeChangeType) -> Self
Create a new regime change.
Sourcepub fn volume_multiplier(&self) -> f64
pub fn volume_multiplier(&self) -> f64
Get the volume multiplier for this regime change.
Sourcepub fn amount_mean_multiplier(&self) -> f64
pub fn amount_mean_multiplier(&self) -> f64
Get the amount mean multiplier for this regime change.
Trait Implementations§
Source§impl Clone for RegimeChange
impl Clone for RegimeChange
Source§fn clone(&self) -> RegimeChange
fn clone(&self) -> RegimeChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegimeChange
impl Debug for RegimeChange
Source§impl<'de> Deserialize<'de> for RegimeChange
impl<'de> Deserialize<'de> for RegimeChange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegimeChange
impl RefUnwindSafe for RegimeChange
impl Send for RegimeChange
impl Sync for RegimeChange
impl Unpin for RegimeChange
impl UnwindSafe for RegimeChange
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