pub struct MPTokenMetadata<'a> {
pub ticker: Cow<'a, str>,
pub name: Cow<'a, str>,
pub desc: Option<Cow<'a, str>>,
pub icon: Cow<'a, str>,
pub asset_class: Cow<'a, str>,
pub asset_subclass: Option<Cow<'a, str>>,
pub issuer_name: Cow<'a, str>,
pub uris: Option<Vec<MPTokenMetadataUri<'a>>>,
pub additional_info: Option<MPTokenMetadataAdditionalInfo<'a>>,
}Expand description
MPTokenMetadata as described by the XLS-89 standard.
Build this in long form and pass it to encode_mptoken_metadata to
produce the compact hex blob stored on-ledger;
decode_mptoken_metadata produces a JSON value that deserializes back
into this type.
Fields§
§ticker: Cow<'a, str>Ticker symbol: uppercase letters (A-Z) and digits (0-9), max 6 chars.
name: Cow<'a, str>Display name of the token.
desc: Option<Cow<'a, str>>Short description of the token.
icon: Cow<'a, str>URI to the token icon.
asset_class: Cow<'a, str>Top-level classification: rwa, memes, wrapped, gaming, defi, or other.
asset_subclass: Option<Cow<'a, str>>Subcategory of the asset class. Required when asset_class is rwa.
issuer_name: Cow<'a, str>Name of the issuer account.
uris: Option<Vec<MPTokenMetadataUri<'a>>>Related URIs (site, dashboard, social media, documentation, …).
additional_info: Option<MPTokenMetadataAdditionalInfo<'a>>Freeform field for key token details (interest rate, maturity, …).
Trait Implementations§
Source§impl<'a> Clone for MPTokenMetadata<'a>
impl<'a> Clone for MPTokenMetadata<'a>
Source§fn clone(&self) -> MPTokenMetadata<'a>
fn clone(&self) -> MPTokenMetadata<'a>
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 moreSource§impl<'a> Debug for MPTokenMetadata<'a>
impl<'a> Debug for MPTokenMetadata<'a>
Source§impl<'de, 'a> Deserialize<'de> for MPTokenMetadata<'a>
impl<'de, 'a> Deserialize<'de> for MPTokenMetadata<'a>
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<'a> PartialEq for MPTokenMetadata<'a>
impl<'a> PartialEq for MPTokenMetadata<'a>
Source§impl<'a> Serialize for MPTokenMetadata<'a>
impl<'a> Serialize for MPTokenMetadata<'a>
impl<'a> StructuralPartialEq for MPTokenMetadata<'a>
Auto Trait Implementations§
impl<'a> Freeze for MPTokenMetadata<'a>
impl<'a> RefUnwindSafe for MPTokenMetadata<'a>
impl<'a> Send for MPTokenMetadata<'a>
impl<'a> Sync for MPTokenMetadata<'a>
impl<'a> Unpin for MPTokenMetadata<'a>
impl<'a> UnsafeUnpin for MPTokenMetadata<'a>
impl<'a> UnwindSafe for MPTokenMetadata<'a>
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