Struct diem_types::account_config::events::exchange_rate_update::ToXDXExchangeRateUpdateEvent [−][src]
pub struct ToXDXExchangeRateUpdateEvent { /* fields omitted */ }
Expand description
Struct that represents a ToXDXExchangeRateUpdateEvent
Implementations
impl ToXDXExchangeRateUpdateEvent
[src]
impl ToXDXExchangeRateUpdateEvent
[src]pub fn new_to_xdx_exchange_rate(&self) -> f32
[src]
pub fn new_to_xdx_exchange_rate(&self) -> f32
[src]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).
pub fn currency_code(&self) -> &IdentStr
[src]
pub fn currency_code(&self) -> &IdentStr
[src]Return the code for the currency whose exchange rate was updated
pub fn try_from_bytes(bytes: &[u8]) -> Result<Self>
[src]
Trait Implementations
impl Debug for ToXDXExchangeRateUpdateEvent
[src]
impl Debug for ToXDXExchangeRateUpdateEvent
[src]impl<'de> Deserialize<'de> for ToXDXExchangeRateUpdateEvent
[src]
impl<'de> Deserialize<'de> for ToXDXExchangeRateUpdateEvent
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl MoveResource for ToXDXExchangeRateUpdateEvent
[src]
impl MoveResource for ToXDXExchangeRateUpdateEvent
[src]const MODULE_NAME: &'static str
[src]
const STRUCT_NAME: &'static str
[src]
fn module_identifier() -> Identifier
[src]
fn struct_identifier() -> Identifier
[src]
fn type_params() -> Vec<TypeTag, Global>
[src]
fn struct_tag() -> StructTag
[src]
fn resource_path() -> Vec<u8, Global>
[src]
impl TryFrom<&'_ ContractEvent> for ToXDXExchangeRateUpdateEvent
[src]
impl TryFrom<&'_ ContractEvent> for ToXDXExchangeRateUpdateEvent
[src]Auto Trait Implementations
impl RefUnwindSafe for ToXDXExchangeRateUpdateEvent
impl Send for ToXDXExchangeRateUpdateEvent
impl Sync for ToXDXExchangeRateUpdateEvent
impl Unpin for ToXDXExchangeRateUpdateEvent
impl UnwindSafe for ToXDXExchangeRateUpdateEvent
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]pub fn test_only_hash(&self) -> HashValue
[src]
pub fn test_only_hash(&self) -> HashValue
[src]Generates a hash used only for tests.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,