Struct erc_nft_metadata::Metadata
source · [−]pub struct Metadata {
pub image: Url,
pub external_url: Option<Url>,
pub description: String,
pub name: String,
pub attributes: Vec<AttributeEntry>,
pub background_color: Option<RGB8>,
pub animation_url: Option<Url>,
pub youtube_url: Option<Url>,
}Expand description
Metadata for a token.
While even an empty object is “valid” metadata, this crate takes a more opinionated approach.
The following fields are strictly required: name, description, image.
Fields
image: UrlURL to image of the item.
external_url: Option<Url>External URL to another site.
description: StringHuman-readable description of the item.
name: StringName of the item.
attributes: Vec<AttributeEntry>Attributes for the item.
background_color: Option<RGB8>Background color of the item.
When serialized, it takes the form of a 6-character hexadecimal string without a #.
animation_url: Option<Url>URL to multi-media attachment for the item.
youtube_url: Option<Url>URL to a YouTube video.
Trait Implementations
impl Eq for Metadata
impl StructuralEq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more