pub struct AuditEngagementGenerator { /* private fields */ }Expand description
Generator for audit engagements and related data.
Implementations§
Source§impl AuditEngagementGenerator
impl AuditEngagementGenerator
Sourcepub fn with_config(seed: u64, config: AuditEngagementConfig) -> Self
pub fn with_config(seed: u64, config: AuditEngagementConfig) -> Self
Create a new generator with custom configuration.
Sourcepub fn set_team_config(&mut self, team_config: &AuditTeamConfig)
pub fn set_team_config(&mut self, team_config: &AuditTeamConfig)
v3.3.2: override internal config with the user-facing audit schema configuration.
Maps AuditTeamConfig.{min_team_size, max_team_size} onto the
generator’s team_size_range. The specialist_probability is
surfaced via specialist_probability_override so downstream
team-composition code can honour it without a full refactor.
Sourcepub fn draw_engagement_type(
&mut self,
types: &AuditEngagementTypesConfig,
) -> EngagementType
pub fn draw_engagement_type( &mut self, types: &AuditEngagementTypesConfig, ) -> EngagementType
v3.3.2: draw an engagement type honoring the user-configured
distribution from AuditEngagementTypesConfig.
Maps the 5 schema probabilities onto the 5 EngagementType
variants the model exposes (AnnualAudit / IntegratedAudit /
ReviewEngagement / AgreedUponProcedures, with SOX ICFR rolled
into IntegratedAudit since ASC 404 + financial-statement audit
is always run as integrated). The rolled-in SOX probability is
summed with integrated; financial_statement maps to
AnnualAudit.
Sourcepub fn generate_engagement(
&mut self,
client_entity_id: &str,
client_name: &str,
fiscal_year: u16,
period_end_date: NaiveDate,
total_revenue: Decimal,
engagement_type: Option<EngagementType>,
) -> AuditEngagement
pub fn generate_engagement( &mut self, client_entity_id: &str, client_name: &str, fiscal_year: u16, period_end_date: NaiveDate, total_revenue: Decimal, engagement_type: Option<EngagementType>, ) -> AuditEngagement
Generate an audit engagement for a company.
Sourcepub fn generate_engagements_batch(
&mut self,
companies: &[CompanyInfo],
fiscal_year: u16,
) -> Vec<AuditEngagement>
pub fn generate_engagements_batch( &mut self, companies: &[CompanyInfo], fiscal_year: u16, ) -> Vec<AuditEngagement>
Generate multiple engagements for a batch of companies.
Sourcepub fn advance_engagement_phase(
&mut self,
engagement: &mut AuditEngagement,
current_date: NaiveDate,
)
pub fn advance_engagement_phase( &mut self, engagement: &mut AuditEngagement, current_date: NaiveDate, )
Advance an engagement to the next phase based on current date.
Auto Trait Implementations§
impl Freeze for AuditEngagementGenerator
impl RefUnwindSafe for AuditEngagementGenerator
impl Send for AuditEngagementGenerator
impl Sync for AuditEngagementGenerator
impl Unpin for AuditEngagementGenerator
impl UnsafeUnpin for AuditEngagementGenerator
impl UnwindSafe for AuditEngagementGenerator
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.