pub struct MockGeneratorConfig {
pub realistic_mode: bool,
pub default_array_size: usize,
pub max_array_size: usize,
pub include_optional_fields: bool,
pub field_mappings: HashMap<String, String>,
pub validate_generated_data: bool,
pub enable_backstories: bool,
}Expand description
Configuration for mock data generation
Fields§
§realistic_mode: boolWhether to use realistic data patterns
default_array_size: usizeDefault array size for generated arrays
max_array_size: usizeMaximum array size for generated arrays
include_optional_fields: boolWhether to include optional fields
field_mappings: HashMap<String, String>Custom field mappings for specific field names
validate_generated_data: boolWhether to validate generated data against schemas
enable_backstories: boolWhether to generate backstories for personas
Implementations§
Source§impl MockGeneratorConfig
impl MockGeneratorConfig
Sourcepub fn realistic_mode(self, enabled: bool) -> Self
pub fn realistic_mode(self, enabled: bool) -> Self
Enable realistic data generation
Sourcepub fn default_array_size(self, size: usize) -> Self
pub fn default_array_size(self, size: usize) -> Self
Set default array size
Sourcepub fn max_array_size(self, size: usize) -> Self
pub fn max_array_size(self, size: usize) -> Self
Set maximum array size
Sourcepub fn include_optional_fields(self, include: bool) -> Self
pub fn include_optional_fields(self, include: bool) -> Self
Control whether to include optional fields
Sourcepub fn field_mapping(self, field_name: String, faker_type: String) -> Self
pub fn field_mapping(self, field_name: String, faker_type: String) -> Self
Add a custom field mapping
Sourcepub fn validate_generated_data(self, validate: bool) -> Self
pub fn validate_generated_data(self, validate: bool) -> Self
Enable/disable data validation
Sourcepub fn enable_backstories(self, enable: bool) -> Self
pub fn enable_backstories(self, enable: bool) -> Self
Enable/disable backstory generation for personas
Trait Implementations§
Source§impl Clone for MockGeneratorConfig
impl Clone for MockGeneratorConfig
Source§fn clone(&self) -> MockGeneratorConfig
fn clone(&self) -> MockGeneratorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MockGeneratorConfig
impl Debug for MockGeneratorConfig
Auto Trait Implementations§
impl Freeze for MockGeneratorConfig
impl RefUnwindSafe for MockGeneratorConfig
impl Send for MockGeneratorConfig
impl Sync for MockGeneratorConfig
impl Unpin for MockGeneratorConfig
impl UnwindSafe for MockGeneratorConfig
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