pub struct UserGenerator { /* private fields */ }Expand description
Generator for user pools with realistic names.
Implementations§
Source§impl UserGenerator
impl UserGenerator
Sourcepub fn with_config(seed: u64, config: UserGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: UserGeneratorConfig) -> Self
Create a new user generator with custom configuration.
Sourcepub fn generate_user(
&mut self,
persona: UserPersona,
department: Option<&Department>,
) -> User
pub fn generate_user( &mut self, persona: UserPersona, department: Option<&Department>, ) -> User
Generate a single user for a specific persona.
Sourcepub fn generate_user_with_name(
&mut self,
name: PersonName,
persona: UserPersona,
department: Option<&Department>,
) -> User
pub fn generate_user_with_name( &mut self, name: PersonName, persona: UserPersona, department: Option<&Department>, ) -> User
Generate a user with a specific name (for deterministic generation).
Sourcepub fn generate_from_organization(
&mut self,
org: &OrganizationStructure,
company_codes: &[String],
) -> UserPool
pub fn generate_from_organization( &mut self, org: &OrganizationStructure, company_codes: &[String], ) -> UserPool
Generate a user pool from an organization structure.
Sourcepub fn generate_simple_pool(
&mut self,
junior_count: usize,
senior_count: usize,
controller_count: usize,
manager_count: usize,
automated_count: usize,
company_codes: &[String],
) -> UserPool
pub fn generate_simple_pool( &mut self, junior_count: usize, senior_count: usize, controller_count: usize, manager_count: usize, automated_count: usize, company_codes: &[String], ) -> UserPool
Generate a simple user pool with specified counts per persona.
Sourcepub fn generate_standard(&mut self, company_codes: &[String]) -> UserPool
pub fn generate_standard(&mut self, company_codes: &[String]) -> UserPool
Generate a standard user pool (equivalent to UserPool::generate_standard but with realistic names).
Auto Trait Implementations§
impl Freeze for UserGenerator
impl RefUnwindSafe for UserGenerator
impl Send for UserGenerator
impl Sync for UserGenerator
impl Unpin for UserGenerator
impl UnwindSafe for UserGenerator
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