1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use crate::*; /// Currency name #[derive(Debug, Clone, Eq, Hash, PartialEq, Deserialize, Serialize)] pub struct CurrencyName(pub String); impl Display for CurrencyName { fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> { write!(f, "{}", self.0) } } impl From<&str> for CurrencyName { fn from(s: &str) -> Self { CurrencyName(s.to_owned()) } }