FormattableCurrency

Trait FormattableCurrency 

Source
pub trait FormattableCurrency:
    PartialEq
    + Eq
    + Copy {
    // Required methods
    fn to_string(&self) -> String;
    fn exponent(&self) -> u32;
    fn code(&self) -> &'static str;
    fn locale(&self) -> Locale;
    fn symbol(&self) -> &'static str;
    fn symbol_first(&self) -> bool;
}
Expand description

Pre-requisite for a Currency to be accepted by a Money.

Required Methods§

Source

fn to_string(&self) -> String

Source

fn exponent(&self) -> u32

Source

fn code(&self) -> &'static str

Source

fn locale(&self) -> Locale

Source

fn symbol(&self) -> &'static str

Source

fn symbol_first(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§