Skip to main content

ICMatchingEngine

Struct ICMatchingEngine 

Source
pub struct ICMatchingEngine { /* private fields */ }
Expand description

IC Matching Engine for reconciliation.

Implementations§

Source§

impl ICMatchingEngine

Source

pub fn new(config: ICMatchingConfig) -> Self

Create a new matching engine.

Source

pub fn add_receivable( &mut self, creditor: &str, debtor: &str, amount: Decimal, ic_reference: Option<&str>, date: NaiveDate, )

Add a receivable entry to the engine.

Source

pub fn add_payable( &mut self, debtor: &str, creditor: &str, amount: Decimal, ic_reference: Option<&str>, date: NaiveDate, )

Add a payable entry to the engine.

Source

pub fn load_matched_pairs(&mut self, pairs: &[ICMatchedPair])

Load matched pairs into the engine.

Source

pub fn load_journal_entries(&mut self, entries: &[JournalEntry])

Load journal entries and extract IC items.

Source

pub fn run_matching(&mut self, as_of_date: NaiveDate) -> ICMatchingResult

Perform matching process.

Source

pub fn get_balances(&self) -> Vec<&ICAggregatedBalance>

Get aggregated balances.

Source

pub fn get_unmatched_balances(&self) -> Vec<&ICAggregatedBalance>

Get unmatched balances.

Source

pub fn get_balance( &self, creditor: &str, debtor: &str, ) -> Option<&ICAggregatedBalance>

Get balance for a specific company pair.

Source

pub fn generate_netting( &self, companies: Vec<String>, period_start: NaiveDate, period_end: NaiveDate, settlement_date: NaiveDate, ) -> ICNettingArrangement

Generate netting arrangement.

Source

pub fn get_statistics(&self) -> MatchingStatistics

Get matching statistics.

Source

pub fn clear(&mut self)

Clear all data.

Source§

impl ICMatchingEngine

Source

pub fn identify_discrepancies(&self) -> Vec<ICDiscrepancy>

Identify discrepancies requiring action.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V