pub struct MaterialGenerator { /* private fields */ }Expand description
Generator for material master data.
Implementations§
Source§impl MaterialGenerator
impl MaterialGenerator
Sourcepub fn with_config(seed: u64, config: MaterialGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: MaterialGeneratorConfig) -> Self
Create a new material generator with custom configuration.
Sourcepub fn generate_material(
&mut self,
_company_code: &str,
_effective_date: NaiveDate,
) -> Material
pub fn generate_material( &mut self, _company_code: &str, _effective_date: NaiveDate, ) -> Material
Generate a single material.
Sourcepub fn generate_material_of_type(
&mut self,
material_type: MaterialType,
_company_code: &str,
_effective_date: NaiveDate,
) -> Material
pub fn generate_material_of_type( &mut self, material_type: MaterialType, _company_code: &str, _effective_date: NaiveDate, ) -> Material
Generate a material with specific type.
Sourcepub fn generate_material_with_bom(
&mut self,
company_code: &str,
effective_date: NaiveDate,
component_count: usize,
) -> Material
pub fn generate_material_with_bom( &mut self, company_code: &str, effective_date: NaiveDate, component_count: usize, ) -> Material
Generate a material with BOM.
Sourcepub fn generate_material_pool(
&mut self,
count: usize,
company_code: &str,
effective_date: NaiveDate,
) -> MaterialPool
pub fn generate_material_pool( &mut self, count: usize, company_code: &str, effective_date: NaiveDate, ) -> MaterialPool
Generate a material pool with specified count.
Sourcepub fn generate_material_pool_with_bom(
&mut self,
count: usize,
bom_rate: f64,
company_code: &str,
effective_date: NaiveDate,
) -> MaterialPool
pub fn generate_material_pool_with_bom( &mut self, count: usize, bom_rate: f64, company_code: &str, effective_date: NaiveDate, ) -> MaterialPool
Generate a material pool with BOMs.
Auto Trait Implementations§
impl Freeze for MaterialGenerator
impl RefUnwindSafe for MaterialGenerator
impl Send for MaterialGenerator
impl Sync for MaterialGenerator
impl Unpin for MaterialGenerator
impl UnwindSafe for MaterialGenerator
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