pub struct NettingRunGenerator { /* private fields */ }Expand description
Generates intercompany netting runs from IC transaction amounts.
Implementations§
Source§impl NettingRunGenerator
impl NettingRunGenerator
Sourcepub fn new(config: NettingSchemaConfig, _seed: u64) -> Self
pub fn new(config: NettingSchemaConfig, _seed: u64) -> Self
Creates a new netting run generator.
Sourcepub fn generate(
&mut self,
entity_ids: &[String],
currency: &str,
start_date: NaiveDate,
period_months: u32,
ic_amounts: &[(String, String, Decimal)],
) -> Vec<NettingRun>
pub fn generate( &mut self, entity_ids: &[String], currency: &str, start_date: NaiveDate, period_months: u32, ic_amounts: &[(String, String, Decimal)], ) -> Vec<NettingRun>
Generates netting runs from intercompany matched-pair amounts.
ic_amounts contains (seller_entity, buyer_entity, amount) tuples.
Transactions are grouped into monthly (or configured cycle) netting runs.
Each run contains per-entity positions with gross receivables, gross
payables, and the resulting net position / settlement direction.
Auto Trait Implementations§
impl Freeze for NettingRunGenerator
impl RefUnwindSafe for NettingRunGenerator
impl Send for NettingRunGenerator
impl Sync for NettingRunGenerator
impl Unpin for NettingRunGenerator
impl UnsafeUnpin for NettingRunGenerator
impl UnwindSafe for NettingRunGenerator
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