Struct diem_sdk::types::account_config::resources::CurrencyInfoResource
pub struct CurrencyInfoResource { /* private fields */ }
Expand description
Struct that represents a CurrencyInfo resource
Implementations§
§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 ) -> CurrencyInfoResource
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<CurrencyInfoResource, Error>
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§
§impl Clone for CurrencyInfoResource
impl Clone for CurrencyInfoResource
§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 more§impl Debug for CurrencyInfoResource
impl Debug for CurrencyInfoResource
§impl<'de> Deserialize<'de> for CurrencyInfoResource
impl<'de> Deserialize<'de> for CurrencyInfoResource
§fn deserialize<__D>(
__deserializer: __D
) -> Result<CurrencyInfoResource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<CurrencyInfoResource, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<&CurrencyInfoResource> for CurrencyInfoView
impl From<&CurrencyInfoResource> for CurrencyInfoView
§fn from(info: &CurrencyInfoResource) -> CurrencyInfoView
fn from(info: &CurrencyInfoResource) -> CurrencyInfoView
Converts to this type from the input type.
§impl MoveResource for CurrencyInfoResource
impl MoveResource for CurrencyInfoResource
§impl MoveStructType for CurrencyInfoResource
impl MoveStructType for CurrencyInfoResource
const MODULE_NAME: &'static IdentStr = DIEM_MODULE_IDENTIFIER
const STRUCT_NAME: &'static IdentStr = { let s: &'static str = "CurrencyInfo"; let is_valid = ::move_core_types::identifier::is_valid(s); ["String is not a valid Move identifier"][!is_valid as usize]; unsafe { ::std::mem::transmute::<&'static str, &'static ::move_core_types::identifier::IdentStr>(s) } }
fn module_identifier() -> Identifier
fn struct_identifier() -> Identifier
fn type_params() -> Vec<TypeTag, Global> ⓘ
fn struct_tag() -> StructTag
§impl Serialize for CurrencyInfoResource
impl Serialize for CurrencyInfoResource
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.