pub struct AssetGenerator { /* private fields */ }Expand description
Generator for fixed asset master data.
Implementations§
Source§impl AssetGenerator
impl AssetGenerator
Sourcepub fn with_config(seed: u64, config: AssetGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: AssetGeneratorConfig) -> Self
Create a new asset generator with custom configuration.
Sourcepub fn generate_asset(
&mut self,
company_code: &str,
acquisition_date: NaiveDate,
) -> FixedAsset
pub fn generate_asset( &mut self, company_code: &str, acquisition_date: NaiveDate, ) -> FixedAsset
Generate a single fixed asset.
Sourcepub fn generate_asset_of_class(
&mut self,
asset_class: AssetClass,
company_code: &str,
acquisition_date: NaiveDate,
) -> FixedAsset
pub fn generate_asset_of_class( &mut self, asset_class: AssetClass, company_code: &str, acquisition_date: NaiveDate, ) -> FixedAsset
Generate an asset with specific class.
Sourcepub fn generate_aged_asset(
&mut self,
company_code: &str,
acquisition_date: NaiveDate,
as_of_date: NaiveDate,
) -> FixedAsset
pub fn generate_aged_asset( &mut self, company_code: &str, acquisition_date: NaiveDate, as_of_date: NaiveDate, ) -> FixedAsset
Generate an asset with depreciation already applied.
Sourcepub fn generate_asset_pool(
&mut self,
count: usize,
company_code: &str,
date_range: (NaiveDate, NaiveDate),
) -> FixedAssetPool
pub fn generate_asset_pool( &mut self, count: usize, company_code: &str, date_range: (NaiveDate, NaiveDate), ) -> FixedAssetPool
Generate an asset pool with specified count.
Sourcepub fn generate_aged_asset_pool(
&mut self,
count: usize,
company_code: &str,
acquisition_date_range: (NaiveDate, NaiveDate),
as_of_date: NaiveDate,
) -> FixedAssetPool
pub fn generate_aged_asset_pool( &mut self, count: usize, company_code: &str, acquisition_date_range: (NaiveDate, NaiveDate), as_of_date: NaiveDate, ) -> FixedAssetPool
Generate an asset pool with aged assets (depreciation applied).
Sourcepub fn generate_diverse_pool(
&mut self,
count: usize,
company_code: &str,
date_range: (NaiveDate, NaiveDate),
) -> FixedAssetPool
pub fn generate_diverse_pool( &mut self, count: usize, company_code: &str, date_range: (NaiveDate, NaiveDate), ) -> FixedAssetPool
Generate a diverse asset pool with various classes.
Auto Trait Implementations§
impl Freeze for AssetGenerator
impl RefUnwindSafe for AssetGenerator
impl Send for AssetGenerator
impl Sync for AssetGenerator
impl Unpin for AssetGenerator
impl UnwindSafe for AssetGenerator
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