pub struct XAL;Expand description
Aluminum (XAL)
Aluminum is traded in metric tons with 4 decimal places of precision. This represents the standard trading unit for aluminum in financial markets.
§Example
use typed_money::{Amount, XAL};
let aluminum = Amount::<XAL>::from_major(1);
println!("{}", aluminum); // Displays: 1.0000 XALTrait Implementations§
Source§impl Currency for XAL
impl Currency for XAL
Source§const DECIMALS: u8 = 4u8
const DECIMALS: u8 = 4u8
Number of decimal places for this currency (e.g., 2 for USD, 0 for JPY)
Source§const NAME: &'static str = "Aluminum"
const NAME: &'static str = "Aluminum"
Full currency name (e.g., “US Dollar”, “Euro”, “Bitcoin”)
Source§const REGION: &'static str = "Worldwide"
const REGION: &'static str = "Worldwide"
Geographic region where this currency is primarily used
Source§const CURRENCY_TYPE: CurrencyType = CurrencyType::Commodity
const CURRENCY_TYPE: CurrencyType = CurrencyType::Commodity
Type of currency (Fiat, Cryptocurrency, or Commodity)
Source§const INTRODUCED_YEAR: u16 = 0u16
const INTRODUCED_YEAR: u16 = 0u16
Year when this currency was introduced
Source§const ISO_4217_NUMBER: u16 = 0u16
const ISO_4217_NUMBER: u16 = 0u16
Official ISO 4217 numeric code
Source§const THOUSANDS_SEPARATOR: char = ','
const THOUSANDS_SEPARATOR: char = ','
Character used to separate thousands (e.g., ‘,’ for US, ‘.’ for EU)
Source§const DECIMAL_SEPARATOR: char = '.'
const DECIMAL_SEPARATOR: char = '.'
Character used as decimal separator (e.g., ‘.’ for US, ‘,’ for EU)
Source§const SYMBOL_POSITION: SymbolPosition = SymbolPosition::Before
const SYMBOL_POSITION: SymbolPosition = SymbolPosition::Before
Position of currency symbol relative to the amount
Source§const SPACE_BETWEEN: bool = false
const SPACE_BETWEEN: bool = false
Whether to include a space between symbol and amount
Source§const VOLATILITY_RATING: VolatilityRating = VolatilityRating::Medium
const VOLATILITY_RATING: VolatilityRating = VolatilityRating::Medium
Static volatility rating (Low, Medium, High)
Source§const LIQUIDITY_RATING: LiquidityRating = LiquidityRating::High
const LIQUIDITY_RATING: LiquidityRating = LiquidityRating::High
Static liquidity rating (Low, Medium, High)
Source§impl Ord for XAL
impl Ord for XAL
Source§impl PartialOrd for XAL
impl PartialOrd for XAL
impl Copy for XAL
impl Eq for XAL
impl StructuralPartialEq for XAL
Auto Trait Implementations§
impl Freeze for XAL
impl RefUnwindSafe for XAL
impl Send for XAL
impl Sync for XAL
impl Unpin for XAL
impl UnwindSafe for XAL
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