pub struct XCU;Expand description
Copper (XCU)
Copper is traded in metric tons with 4 decimal places of precision. This represents the standard trading unit for copper in financial markets.
§Example
use typed_money::{Amount, XCU};
let copper = Amount::<XCU>::from_major(1);
println!("{}", copper); // Displays: 1.0000 XCUTrait Implementations§
Source§impl Currency for XCU
impl Currency for XCU
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 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 XCU
impl Ord for XCU
Source§impl PartialOrd for XCU
impl PartialOrd for XCU
impl Copy for XCU
impl Eq for XCU
impl StructuralPartialEq for XCU
Auto Trait Implementations§
impl Freeze for XCU
impl RefUnwindSafe for XCU
impl Send for XCU
impl Sync for XCU
impl Unpin for XCU
impl UnwindSafe for XCU
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