pub struct ExpenseReportGenerator { /* private fields */ }Expand description
Generates ExpenseReport records for employees over a period.
Implementations§
Source§impl ExpenseReportGenerator
impl ExpenseReportGenerator
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Create a new expense report generator with default configuration.
Sourcepub fn with_config(seed: u64, config: ExpenseConfig) -> Self
pub fn with_config(seed: u64, config: ExpenseConfig) -> Self
Create an expense report generator with custom configuration.
Sourcepub fn generate(
&mut self,
employee_ids: &[String],
period_start: NaiveDate,
period_end: NaiveDate,
config: &ExpenseConfig,
) -> Vec<ExpenseReport>
pub fn generate( &mut self, employee_ids: &[String], period_start: NaiveDate, period_end: NaiveDate, config: &ExpenseConfig, ) -> Vec<ExpenseReport>
Generate expense reports for employees over the given period.
Only config.submission_rate fraction of employees submit reports each
month within the period.
§Arguments
employee_ids- Slice of employee identifiersperiod_start- Start of the period (inclusive)period_end- End of the period (inclusive)config- Expense management configuration
Auto Trait Implementations§
impl !Freeze for ExpenseReportGenerator
impl RefUnwindSafe for ExpenseReportGenerator
impl Send for ExpenseReportGenerator
impl Sync for ExpenseReportGenerator
impl Unpin for ExpenseReportGenerator
impl UnwindSafe for ExpenseReportGenerator
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