pub struct LeaseGenerator { /* private fields */ }Expand description
Generator for lease accounting records (IFRS 16 / ASC 842).
Implementations§
Source§impl LeaseGenerator
impl LeaseGenerator
Sourcepub fn generate(
&mut self,
company_code: &str,
commencement_anchor: NaiveDate,
config: &LeaseAccountingConfig,
framework: AccountingFramework,
) -> Vec<Lease>
pub fn generate( &mut self, company_code: &str, commencement_anchor: NaiveDate, config: &LeaseAccountingConfig, framework: AccountingFramework, ) -> Vec<Lease>
Generate config.lease_count leases for one entity.
Lease parameters are drawn from:
- Term: Normal(mean=
config.avg_lease_term_months, σ=~12) clamped to [6, 240]. - Fair value: LogNormal(μ=11, σ=1.3) — centered around $60k, heavy right tail for large real-estate leases.
- Fixed payment: ~fair_value / term_months × (1 + margin), margin drawn from Normal(0.15, 0.08).
- Discount rate: Uniform [0.03, 0.08] (typical IBR band).
- Classification proportion: driven by
config.finance_lease_percentvia setting thetransfers_ownershipflag on that share (ASC 842 Test 1) so the standards library classifies them Finance.
Auto Trait Implementations§
impl Freeze for LeaseGenerator
impl RefUnwindSafe for LeaseGenerator
impl Send for LeaseGenerator
impl Sync for LeaseGenerator
impl Unpin for LeaseGenerator
impl UnsafeUnpin for LeaseGenerator
impl UnwindSafe for LeaseGenerator
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.