pub struct CycleCountGenerator { /* private fields */ }Expand description
Generates CycleCount instances with realistic variance distributions
and adjustment patterns.
Implementations§
Source§impl CycleCountGenerator
impl CycleCountGenerator
Sourcepub fn with_employee_pool(self, employee_ids: Vec<String>) -> Self
pub fn with_employee_pool(self, employee_ids: Vec<String>) -> Self
Set the employee ID pool used for counter and supervisor IDs.
When non-empty, counter_id and supervisor_id are picked from this
pool instead of fabricated WH-{:02} / SUP-{:02} strings.
Sourcepub fn with_material_descriptions(
self,
descriptions: HashMap<String, String>,
) -> Self
pub fn with_material_descriptions( self, descriptions: HashMap<String, String>, ) -> Self
Set the material description mapping for denormalization (DS-011).
Maps material IDs to their descriptions so that generated cycle count items include the material description for graph export convenience.
Sourcepub fn generate(
&mut self,
company_code: &str,
material_ids: &[(String, String)],
count_date: NaiveDate,
items_per_count: usize,
) -> CycleCount
pub fn generate( &mut self, company_code: &str, material_ids: &[(String, String)], count_date: NaiveDate, items_per_count: usize, ) -> CycleCount
Generate a single cycle count event covering the specified materials.
§Arguments
company_code- Company code for the cycle count.material_ids- Available materials as(material_id, storage_location)tuples.count_date- Date the count is performed.items_per_count- Number of items to include in this count.
Auto Trait Implementations§
impl !Freeze for CycleCountGenerator
impl RefUnwindSafe for CycleCountGenerator
impl Send for CycleCountGenerator
impl Sync for CycleCountGenerator
impl Unpin for CycleCountGenerator
impl UnsafeUnpin for CycleCountGenerator
impl UnwindSafe for CycleCountGenerator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.