Struct chainhook_types::Currency
source · pub struct Currency {
pub symbol: String,
pub decimals: u32,
pub metadata: Option<CurrencyMetadata>,
}Expand description
Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
Fields§
§symbol: StringCanonical symbol associated with a currency.
decimals: u32Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.
metadata: Option<CurrencyMetadata>Any additional information related to the currency itself.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Currency
impl<'de> Deserialize<'de> for Currency
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 PartialEq<Currency> for Currency
impl PartialEq<Currency> for Currency
impl StructuralPartialEq for Currency
Auto Trait Implementations§
impl RefUnwindSafe for Currency
impl Send for Currency
impl Sync for Currency
impl Unpin for Currency
impl UnwindSafe for Currency
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