pub struct GoingConcernGenerator { /* private fields */ }Expand description
Generator for ISA 570 / ASC 205-40 going concern assessments.
Implementations§
Source§impl GoingConcernGenerator
impl GoingConcernGenerator
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Create a new generator with the given seed and default configuration.
Sourcepub fn with_config(seed: u64, config: GoingConcernGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: GoingConcernGeneratorConfig) -> Self
Create a new generator with custom configuration.
Sourcepub fn generate_for_entity(
&mut self,
entity_code: &str,
assessment_date: NaiveDate,
period: &str,
) -> GoingConcernAssessment
pub fn generate_for_entity( &mut self, entity_code: &str, assessment_date: NaiveDate, period: &str, ) -> GoingConcernAssessment
Generate a going concern assessment for a single entity.
§Arguments
entity_code— Entity code being assessed.assessment_date— Date the assessment was finalised (typically the financial statement approval date).period— Human-readable period descriptor (e.g. “FY2024”).
Sourcepub fn generate_for_entities(
&mut self,
entity_codes: &[String],
assessment_date: NaiveDate,
period: &str,
) -> Vec<GoingConcernAssessment>
pub fn generate_for_entities( &mut self, entity_codes: &[String], assessment_date: NaiveDate, period: &str, ) -> Vec<GoingConcernAssessment>
Generate assessments for multiple entities in a single batch.
Sourcepub fn generate_for_entity_with_input(
&mut self,
input: &GoingConcernInput,
period: &str,
) -> GoingConcernAssessment
pub fn generate_for_entity_with_input( &mut self, input: &GoingConcernInput, period: &str, ) -> GoingConcernAssessment
Generate a going concern assessment driven by actual financial data.
Financial indicators (recurring losses, negative working capital, negative
operating cash flow) are determined from the supplied GoingConcernInput.
Non-financial indicators (litigation, regulatory action, etc.) retain the
random element since they cannot be inferred from journal entries alone.
§Indicator mapping
net_income < 0→GoingConcernIndicatorType::RecurringOperatingLossesworking_capital < 0→GoingConcernIndicatorType::WorkingCapitalDeficiencyoperating_cash_flow < 0→GoingConcernIndicatorType::NegativeOperatingCashFlow
§Conclusion
0 indicators → NoMaterialUncertainty, 1–2 → MaterialUncertaintyExists,
3+ → GoingConcernDoubt (same rule as generate_for_entity).
Sourcepub fn generate_for_entities_with_inputs(
&mut self,
entity_codes: &[String],
inputs: &[GoingConcernInput],
assessment_date: NaiveDate,
period: &str,
) -> Vec<GoingConcernAssessment>
pub fn generate_for_entities_with_inputs( &mut self, entity_codes: &[String], inputs: &[GoingConcernInput], assessment_date: NaiveDate, period: &str, ) -> Vec<GoingConcernAssessment>
Generate assessments for multiple entities using financial data inputs.
Entities without a corresponding input fall back to random behaviour.
Auto Trait Implementations§
impl Freeze for GoingConcernGenerator
impl RefUnwindSafe for GoingConcernGenerator
impl Send for GoingConcernGenerator
impl Sync for GoingConcernGenerator
impl Unpin for GoingConcernGenerator
impl UnsafeUnpin for GoingConcernGenerator
impl UnwindSafe for GoingConcernGenerator
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
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.