Struct diem_types::account_config::events::exchange_rate_update::ToXDXExchangeRateUpdateEvent [−][src]
pub struct ToXDXExchangeRateUpdateEvent { /* fields omitted */ }
Expand description
Struct that represents a ToXDXExchangeRateUpdateEvent
Implementations
Exchange rates are represented as 32|32 fixed-point numbers on-chain. So we divide by the scaling factor (2^32) of the number to arrive at the floating point representation of the number. The exchange rate returned is the on-chain rate to two decimal places rounded up (e.g. 1.3333 would be rounded to 1.34).
Return the code for the currency whose exchange rate was updated
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more