Skip to main content
Version: Next

Struct Trait


_10
pub struct Trait {
_10
_10
pub let name: String
_10
_10
pub let value: AnyStruct
_10
_10
pub let displayType: String?
_10
_10
pub let rarity: Rarity?
_10
}

View to represent a single field of metadata on an NFT. This is used to get traits of individual key/value pairs along with some contextualized data about the trait

Initializer


_10
init(name: String, value: AnyStruct, displayType: String?, rarity: Rarity?)