pub struct FxRateGenerator { /* private fields */ }Expand description
Generates a complete set of FX rates for a simulation period.
Implementations§
Source§impl FxRateGenerator
impl FxRateGenerator
Sourcepub fn new(config: FxRateServiceConfig, rng: ChaCha8Rng) -> Self
pub fn new(config: FxRateServiceConfig, rng: ChaCha8Rng) -> Self
Creates a new FX rate generator.
Sourcepub fn generate_all_rates(
&mut self,
start_date: NaiveDate,
end_date: NaiveDate,
) -> GeneratedFxRates
pub fn generate_all_rates( &mut self, start_date: NaiveDate, end_date: NaiveDate, ) -> GeneratedFxRates
Generates all rates (daily, closing, average) for a date range.
Sourcepub fn service(&self) -> &FxRateService
pub fn service(&self) -> &FxRateService
Gets a reference to the underlying service.
Sourcepub fn service_mut(&mut self) -> &mut FxRateService
pub fn service_mut(&mut self) -> &mut FxRateService
Gets a mutable reference to the underlying service.
Auto Trait Implementations§
impl Freeze for FxRateGenerator
impl RefUnwindSafe for FxRateGenerator
impl Send for FxRateGenerator
impl Sync for FxRateGenerator
impl Unpin for FxRateGenerator
impl UnwindSafe for FxRateGenerator
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