use std::fmt;
use std::fmt::Formatter;
#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)]
#[allow(non_camel_case_types)]
pub struct ISO_4217 {
pub alphabetic: &'static str,
pub numeric: &'static str,
}
impl ISO_4217 {
#[must_use]
pub fn new(alphabetic: &'static str, numeric: &'static str) -> Self {
Self {
alphabetic,
numeric,
}
}
#[must_use]
pub fn alphabetic(&self) -> &str {
self.alphabetic
}
#[must_use]
pub fn numeric(&self) -> &'static str {
self.numeric
}
}
impl fmt::Display for ISO_4217 {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
write!(
f,
"Alphabetic: {}, Numeric: {}",
self.alphabetic, self.numeric
)
}
}