pub struct AssetMetadata {
pub name: String,
pub description: String,
pub ticker: Option<String>,
pub url: Option<String>,
pub logo: Option<String>,
pub decimals: Option<i32>,
}Expand description
AssetMetadata : Off-chain metadata fetched from GitHub based on network. Mainnet: https://github.com/cardano-foundation/cardano-token-registry/ Testnet: https://github.com/input-output-hk/metadata-registry-testnet/
Fields§
§name: StringAsset name
description: StringAsset description
ticker: Option<String>§url: Option<String>Asset website
logo: Option<String>Base64 encoded logo of the asset
decimals: Option<i32>Number of decimal places of the asset unit
Implementations§
Source§impl AssetMetadata
impl AssetMetadata
Sourcepub fn new(
name: String,
description: String,
ticker: Option<String>,
url: Option<String>,
logo: Option<String>,
decimals: Option<i32>,
) -> AssetMetadata
pub fn new( name: String, description: String, ticker: Option<String>, url: Option<String>, logo: Option<String>, decimals: Option<i32>, ) -> AssetMetadata
Off-chain metadata fetched from GitHub based on network. Mainnet: https://github.com/cardano-foundation/cardano-token-registry/ Testnet: https://github.com/input-output-hk/metadata-registry-testnet/
Trait Implementations§
Source§impl Clone for AssetMetadata
impl Clone for AssetMetadata
Source§fn clone(&self) -> AssetMetadata
fn clone(&self) -> AssetMetadata
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 AssetMetadata
impl Debug for AssetMetadata
Source§impl Default for AssetMetadata
impl Default for AssetMetadata
Source§fn default() -> AssetMetadata
fn default() -> AssetMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AssetMetadata
impl<'de> Deserialize<'de> for AssetMetadata
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 for AssetMetadata
impl PartialEq for AssetMetadata
Source§impl Serialize for AssetMetadata
impl Serialize for AssetMetadata
impl StructuralPartialEq for AssetMetadata
Auto Trait Implementations§
impl Freeze for AssetMetadata
impl RefUnwindSafe for AssetMetadata
impl Send for AssetMetadata
impl Sync for AssetMetadata
impl Unpin for AssetMetadata
impl UnwindSafe for AssetMetadata
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