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 set_coa_framework(&mut self, framework: CoAFramework)
pub fn set_coa_framework(&mut self, framework: CoAFramework)
Set the accounting framework for framework-aware asset generation.
Sourcepub fn set_template_provider(&mut self, provider: SharedTemplateProvider)
pub fn set_template_provider(&mut self, provider: SharedTemplateProvider)
Set a template provider so user-supplied asset descriptions override the embedded pool. (v3.2.1+)
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 !RefUnwindSafe for AssetGenerator
impl !UnwindSafe for AssetGenerator
impl Freeze for AssetGenerator
impl Send for AssetGenerator
impl Sync for AssetGenerator
impl Unpin for AssetGenerator
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.