pub struct Metadata {
pub image: Option<String>,
pub image_data: Option<String>,
pub external_url: Option<String>,
pub description: Option<String>,
pub name: Option<String>,
pub attributes: Option<Vec<Trait>>,
pub background_color: Option<String>,
pub animation_url: Option<String>,
pub youtube_url: Option<String>,
}Expand description
OpenSea metadata standard, used by Stargaze marketplace. See this link for details.
Fields§
§image: Option<String>This is the URL to the image of the item. Can be just about any type of image (including SVGs, which will be cached into PNGs by OpenSea), and can be IPFS URLs or paths. We recommend using a 350 x 350 image.
image_data: Option<String>Raw SVG image data, if you want to generate images on the fly (not recommended). Only use
this if you’re not including the image parameter.
external_url: Option<String>This is the URL that will appear below the asset’s image on OpenSea and will allow users to leave OpenSea and view the item on your site.
description: Option<String>A human readable description of the item. Markdown is supported.
name: Option<String>Name of the item.
attributes: Option<Vec<Trait>>These are the attributes for the item, which will show up on the OpenSea page for the item.
background_color: Option<String>Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #.
animation_url: Option<String>A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.
Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.
youtube_url: Option<String>A URL to a YouTube video.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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>,
Source§impl JsonSchema for Metadata
impl JsonSchema for Metadata
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more