pub trait IndustryTransactionGenerator: Send + Sync {
type Transaction: IndustryTransaction;
type Anomaly: IndustryAnomaly;
// Required methods
fn generate_transactions(
&self,
start_date: NaiveDate,
end_date: NaiveDate,
count: usize,
) -> Vec<Self::Transaction>;
fn generate_anomalies(
&self,
transactions: &[Self::Transaction],
) -> Vec<Self::Anomaly>;
fn gl_accounts(&self) -> Vec<IndustryGlAccount>;
}Expand description
Trait for industry-specific transaction generators.
This is the intended future API for pluggable industry modules. Concrete implementations will be added as each industry vertical is built out.
Required Associated Types§
Sourcetype Transaction: IndustryTransaction
type Transaction: IndustryTransaction
The transaction type produced by this generator.
Sourcetype Anomaly: IndustryAnomaly
type Anomaly: IndustryAnomaly
The anomaly type produced by this generator.
Required Methods§
Sourcefn generate_transactions(
&self,
start_date: NaiveDate,
end_date: NaiveDate,
count: usize,
) -> Vec<Self::Transaction>
fn generate_transactions( &self, start_date: NaiveDate, end_date: NaiveDate, count: usize, ) -> Vec<Self::Transaction>
Generates transactions for a period.
Sourcefn generate_anomalies(
&self,
transactions: &[Self::Transaction],
) -> Vec<Self::Anomaly>
fn generate_anomalies( &self, transactions: &[Self::Transaction], ) -> Vec<Self::Anomaly>
Generates industry-specific anomalies.
Sourcefn gl_accounts(&self) -> Vec<IndustryGlAccount>
fn gl_accounts(&self) -> Vec<IndustryGlAccount>
Returns industry-specific GL accounts.