pub struct DocumentChainManager { /* private fields */ }Expand description
Document Chain Manager for coordinated P2P and O2C generation.
Implementations§
Source§impl DocumentChainManager
impl DocumentChainManager
Sourcepub fn with_config(seed: u64, config: DocumentChainManagerConfig) -> Self
pub fn with_config(seed: u64, config: DocumentChainManagerConfig) -> Self
Create a new document chain manager with custom configuration.
Sourcepub fn generate_flows(
&mut self,
company_code: &str,
total_chains: usize,
vendors: &VendorPool,
customers: &CustomerPool,
materials: &MaterialPool,
date_range: (NaiveDate, NaiveDate),
fiscal_year: u16,
created_by: &str,
) -> GeneratedDocumentFlows
pub fn generate_flows( &mut self, company_code: &str, total_chains: usize, vendors: &VendorPool, customers: &CustomerPool, materials: &MaterialPool, date_range: (NaiveDate, NaiveDate), fiscal_year: u16, created_by: &str, ) -> GeneratedDocumentFlows
Generate document flows for a company.
Sourcepub fn generate_balanced_flows(
&mut self,
chains_per_type: usize,
company_code: &str,
vendors: &VendorPool,
customers: &CustomerPool,
materials: &MaterialPool,
date_range: (NaiveDate, NaiveDate),
fiscal_year: u16,
created_by: &str,
) -> GeneratedDocumentFlows
pub fn generate_balanced_flows( &mut self, chains_per_type: usize, company_code: &str, vendors: &VendorPool, customers: &CustomerPool, materials: &MaterialPool, date_range: (NaiveDate, NaiveDate), fiscal_year: u16, created_by: &str, ) -> GeneratedDocumentFlows
Generate balanced document flows (equal P2P and O2C).
Sourcepub fn generate_multi_company_flows(
&mut self,
company_codes: &[String],
chains_per_company: usize,
vendors_by_company: &HashMap<String, VendorPool>,
customers_by_company: &HashMap<String, CustomerPool>,
materials: &MaterialPool,
date_range: (NaiveDate, NaiveDate),
fiscal_year: u16,
created_by: &str,
) -> Vec<GeneratedDocumentFlows>
pub fn generate_multi_company_flows( &mut self, company_codes: &[String], chains_per_company: usize, vendors_by_company: &HashMap<String, VendorPool>, customers_by_company: &HashMap<String, CustomerPool>, materials: &MaterialPool, date_range: (NaiveDate, NaiveDate), fiscal_year: u16, created_by: &str, ) -> Vec<GeneratedDocumentFlows>
Generate flows for multiple company codes.
Sourcepub fn p2p_generator(&mut self) -> &mut P2PGenerator
pub fn p2p_generator(&mut self) -> &mut P2PGenerator
Get reference to P2P generator for direct access.
Sourcepub fn o2c_generator(&mut self) -> &mut O2CGenerator
pub fn o2c_generator(&mut self) -> &mut O2CGenerator
Get reference to O2C generator for direct access.
Auto Trait Implementations§
impl Freeze for DocumentChainManager
impl RefUnwindSafe for DocumentChainManager
impl Send for DocumentChainManager
impl Sync for DocumentChainManager
impl Unpin for DocumentChainManager
impl UnsafeUnpin for DocumentChainManager
impl UnwindSafe for DocumentChainManager
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.