pub struct CurrencyTranslator { /* private fields */ }Expand description
Currency translator for financial statements.
Implementations§
Source§impl CurrencyTranslator
impl CurrencyTranslator
Sourcepub fn new(config: CurrencyTranslatorConfig) -> Self
pub fn new(config: CurrencyTranslatorConfig) -> Self
Creates a new currency translator.
Sourcepub fn translate_trial_balance(
&self,
trial_balance: &TrialBalance,
rate_table: &FxRateTable,
historical_rates: &HashMap<String, Decimal>,
) -> TranslatedTrialBalance
pub fn translate_trial_balance( &self, trial_balance: &TrialBalance, rate_table: &FxRateTable, historical_rates: &HashMap<String, Decimal>, ) -> TranslatedTrialBalance
Translates a trial balance from local to group currency.
Sourcepub fn translate_amount(
&self,
amount: Decimal,
local_currency: &str,
account_type: &TranslationAccountType,
rate_table: &FxRateTable,
date: NaiveDate,
) -> TranslatedAmount
pub fn translate_amount( &self, amount: Decimal, local_currency: &str, account_type: &TranslationAccountType, rate_table: &FxRateTable, date: NaiveDate, ) -> TranslatedAmount
Translates a single amount.
Auto Trait Implementations§
impl Freeze for CurrencyTranslator
impl RefUnwindSafe for CurrencyTranslator
impl Send for CurrencyTranslator
impl Sync for CurrencyTranslator
impl Unpin for CurrencyTranslator
impl UnwindSafe for CurrencyTranslator
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