pub struct EmployeeGenerator { /* private fields */ }Expand description
Generator for employee master data with org hierarchy.
Implementations§
Source§impl EmployeeGenerator
impl EmployeeGenerator
Sourcepub fn with_config(seed: u64, config: EmployeeGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: EmployeeGeneratorConfig) -> Self
Create a new employee generator with custom configuration.
Sourcepub fn generate_employee(
&mut self,
company_code: &str,
department: &DepartmentDefinition,
hire_date: NaiveDate,
) -> Employee
pub fn generate_employee( &mut self, company_code: &str, department: &DepartmentDefinition, hire_date: NaiveDate, ) -> Employee
Generate a single employee.
Sourcepub fn generate_employee_with_level(
&mut self,
company_code: &str,
department: &DepartmentDefinition,
job_level: JobLevel,
hire_date: NaiveDate,
) -> Employee
pub fn generate_employee_with_level( &mut self, company_code: &str, department: &DepartmentDefinition, job_level: JobLevel, hire_date: NaiveDate, ) -> Employee
Generate an employee with specific job level.
Sourcepub fn generate_department_pool(
&mut self,
company_code: &str,
department: &DepartmentDefinition,
hire_date_range: (NaiveDate, NaiveDate),
) -> EmployeePool
pub fn generate_department_pool( &mut self, company_code: &str, department: &DepartmentDefinition, hire_date_range: (NaiveDate, NaiveDate), ) -> EmployeePool
Generate an employee pool for a department.
Sourcepub fn generate_company_pool(
&mut self,
company_code: &str,
hire_date_range: (NaiveDate, NaiveDate),
) -> EmployeePool
pub fn generate_company_pool( &mut self, company_code: &str, hire_date_range: (NaiveDate, NaiveDate), ) -> EmployeePool
Generate a full company employee pool with hierarchy.
Auto Trait Implementations§
impl Freeze for EmployeeGenerator
impl RefUnwindSafe for EmployeeGenerator
impl Send for EmployeeGenerator
impl Sync for EmployeeGenerator
impl Unpin for EmployeeGenerator
impl UnwindSafe for EmployeeGenerator
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