pub struct CurrencyInfoResource { /* private fields */ }
Expand description
Struct that represents a CurrencyInfo resource
Implementations§
source§impl CurrencyInfoResource
impl CurrencyInfoResource
pub fn new( total_value: u128, preburn_value: u64, to_xdx_exchange_rate: u64, is_synthetic: bool, scaling_factor: u64, fractional_part: u64, currency_code: Identifier, can_mint: bool, mint_events: EventHandle, burn_events: EventHandle, preburn_events: EventHandle, cancel_burn_events: EventHandle, exchange_rate_update_events: EventHandle ) -> Self
pub fn currency_code(&self) -> &IdentStr
pub fn scaling_factor(&self) -> u64
pub fn total_value(&self) -> u128
pub fn preburn_value(&self) -> u64
pub fn fractional_part(&self) -> u64
pub fn exchange_rate(&self) -> f32
pub fn convert_to_xdx(&self, amount: u64) -> u64
pub fn struct_tag_for(currency_code: Identifier) -> StructTag
pub fn resource_path_for(currency_code: Identifier) -> AccessPath
pub fn try_from_bytes(bytes: &[u8]) -> Result<Self>
pub fn mint_events(&self) -> &EventHandle
pub fn burn_events(&self) -> &EventHandle
pub fn preburn_events(&self) -> &EventHandle
pub fn cancel_burn_events(&self) -> &EventHandle
pub fn exchange_rate_update_events(&self) -> &EventHandle
Trait Implementations§
source§impl Clone for CurrencyInfoResource
impl Clone for CurrencyInfoResource
source§fn clone(&self) -> CurrencyInfoResource
fn clone(&self) -> CurrencyInfoResource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CurrencyInfoResource
impl Debug for CurrencyInfoResource
source§impl<'de> Deserialize<'de> for CurrencyInfoResource
impl<'de> Deserialize<'de> for CurrencyInfoResource
source§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
source§impl MoveResource for CurrencyInfoResource
impl MoveResource for CurrencyInfoResource
source§impl MoveStructType for CurrencyInfoResource
impl MoveStructType for CurrencyInfoResource
const MODULE_NAME: &'static IdentStr = DIEM_MODULE_IDENTIFIER
const STRUCT_NAME: &'static IdentStr = _
fn module_identifier() -> Identifier
fn struct_identifier() -> Identifier
fn type_params() -> Vec<TypeTag, Global> ⓘ
fn struct_tag() -> StructTag
Auto Trait Implementations§
impl RefUnwindSafe for CurrencyInfoResource
impl Send for CurrencyInfoResource
impl Sync for CurrencyInfoResource
impl Unpin for CurrencyInfoResource
impl UnwindSafe for CurrencyInfoResource
Blanket Implementations§
source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.