@@ -198,6 +198,12 @@ macro_rules! make_currency { | |||||
other => Err(UnlistedCurrency(other)) | other => Err(UnlistedCurrency(other)) | ||||
} | } | ||||
} | } | ||||
pub fn all() -> Vec<Self> { | |||||
vec![ | |||||
$( c!($ticker) ),* | |||||
] | |||||
} | |||||
} | } | ||||
impl TryFrom<u8> for Currency { | impl TryFrom<u8> for Currency { | ||||
@@ -428,6 +434,12 @@ macro_rules! make_exchange { | |||||
),* | ),* | ||||
} | } | ||||
} | } | ||||
pub fn all() -> Vec<Self> { | |||||
vec![ | |||||
$( e!($ticker) ),* | |||||
] | |||||
} | |||||
} | } | ||||
impl TryFrom<u8> for Exchange { | impl TryFrom<u8> for Exchange { | ||||