pub struct DecimalDisplay {
pub decimal_display: u32,
}Expand description
Decimal display dictates how to display the amount of an asset.
Fields§
§decimal_display: u32Decimal display dictates the number of decimal places to shift the amount to the left converting from Taproot Asset integer representation to a UX-recognizable fractional quantity.
For example, if the decimal_display value is 2 and there’s 100 of those assets, then a wallet would display the amount as “1.00”. This field is intended as information for wallets that display balances and has no impact on the behavior of the daemon or any other part of the protocol. This value is encoded in the MetaData field as a JSON field, therefore it is only compatible with assets that have a JSON MetaData field.
Trait Implementations§
Source§impl Clone for DecimalDisplay
impl Clone for DecimalDisplay
Source§fn clone(&self) -> DecimalDisplay
fn clone(&self) -> DecimalDisplay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecimalDisplay
Source§impl Debug for DecimalDisplay
impl Debug for DecimalDisplay
Source§impl<'de> Deserialize<'de> for DecimalDisplay
impl<'de> Deserialize<'de> for DecimalDisplay
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
impl Eq for DecimalDisplay
Source§impl Hash for DecimalDisplay
impl Hash for DecimalDisplay
Source§impl PartialEq for DecimalDisplay
impl PartialEq for DecimalDisplay
Source§fn eq(&self, other: &DecimalDisplay) -> bool
fn eq(&self, other: &DecimalDisplay) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DecimalDisplay
impl Serialize for DecimalDisplay
impl StructuralPartialEq for DecimalDisplay
Auto Trait Implementations§
impl Freeze for DecimalDisplay
impl RefUnwindSafe for DecimalDisplay
impl Send for DecimalDisplay
impl Sync for DecimalDisplay
impl Unpin for DecimalDisplay
impl UnsafeUnpin for DecimalDisplay
impl UnwindSafe for DecimalDisplay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more