Skip to main content

to_currency

Function to_currency 

Source
pub fn to_currency(money: LogosMoney, code: String) -> LogosMoney
Expand description

Convert money to another currency via the ambient rate context — the <money> in <currency> surface. Panics (the typed-error backstop, like a currency-mismatch +) when no rates are in scope or the currency lacks a rate; the front-end / interpreter surface these as clean errors.