pub struct EclGenerator { /* private fields */ }Expand description
Generates ECL models using the simplified approach for trade receivables.
Implementations§
Source§impl EclGenerator
impl EclGenerator
Sourcepub fn generate(
&mut self,
entity_code: &str,
measurement_date: NaiveDate,
bucket_exposures: &[(AgingBucket, Decimal)],
config: &EclConfig,
period_label: &str,
framework: &str,
) -> EclSnapshot
pub fn generate( &mut self, entity_code: &str, measurement_date: NaiveDate, bucket_exposures: &[(AgingBucket, Decimal)], config: &EclConfig, period_label: &str, framework: &str, ) -> EclSnapshot
Generate ECL model from AR aging bucket totals.
§Parameters
entity_code: company / entity identifiermeasurement_date: balance-sheet datebucket_exposures: gross AR balance per aging bucket (ordered: Current, 1-30, 31-60, 61-90, Over90)config: ECL configuration (scenario weights / multipliers)period_label: label for the provision movement (e.g. “2024-Q4”)framework: “IFRS_9” or “ASC_326”
Sourcepub fn generate_with_prior(
&mut self,
entity_code: &str,
measurement_date: NaiveDate,
bucket_exposures: &[(AgingBucket, Decimal)],
config: &EclConfig,
period_label: &str,
framework: &str,
prior_closing: Option<Decimal>,
) -> EclSnapshot
pub fn generate_with_prior( &mut self, entity_code: &str, measurement_date: NaiveDate, bucket_exposures: &[(AgingBucket, Decimal)], config: &EclConfig, period_label: &str, framework: &str, prior_closing: Option<Decimal>, ) -> EclSnapshot
Generate an ECL snapshot, optionally accepting the prior period’s closing provision balance to use as the opening balance for the rollforward.
Pass prior_closing = Some(amount) when generating a subsequent period in a
multi-period series. For the first period, use None (equivalent to zero opening).
Note: full multi-period continuity also requires carrying forward EclModel state
(stage transfers, write-off history) which is a larger architectural change.
Auto Trait Implementations§
impl !Freeze for EclGenerator
impl RefUnwindSafe for EclGenerator
impl Send for EclGenerator
impl Sync for EclGenerator
impl Unpin for EclGenerator
impl UnsafeUnpin for EclGenerator
impl UnwindSafe for EclGenerator
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