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
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.