Struct mpl_token_metadata::state::Metadata
source · #[repr(C)]pub struct Metadata {
pub key: Key,
pub update_authority: Pubkey,
pub mint: Pubkey,
pub data: Data,
pub primary_sale_happened: bool,
pub is_mutable: bool,
pub edition_nonce: Option<u8>,
pub token_standard: Option<TokenStandard>,
pub collection: Option<Collection>,
pub uses: Option<Uses>,
pub collection_details: Option<CollectionDetails>,
pub programmable_config: Option<ProgrammableConfig>,
}
Fields§
§key: Key
Account discriminator.
Address of the update authority.
mint: Pubkey
Address of the mint.
data: Data
Asset data.
primary_sale_happened: bool
§is_mutable: bool
§edition_nonce: Option<u8>
nonce for easy calculation of editions, if present
token_standard: Option<TokenStandard>
Since we cannot easily change Metadata, we add the new DataV2 fields here at the end.
collection: Option<Collection>
Collection
uses: Option<Uses>
Uses
collection_details: Option<CollectionDetails>
Collection Details
programmable_config: Option<ProgrammableConfig>
Programmable Config
Implementations§
Trait Implementations§
source§impl BorshDeserialize for Metadata
impl BorshDeserialize for Metadata
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, BorshError>
fn deserialize(buf: &mut &[u8]) -> Result<Self, BorshError>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§impl BorshSerialize for Metadatawhere
Key: BorshSerialize,
Pubkey: BorshSerialize,
Data: BorshSerialize,
bool: BorshSerialize,
Option<u8>: BorshSerialize,
Option<TokenStandard>: BorshSerialize,
Option<Collection>: BorshSerialize,
Option<Uses>: BorshSerialize,
Option<CollectionDetails>: BorshSerialize,
Option<ProgrammableConfig>: BorshSerialize,
impl BorshSerialize for Metadatawhere Key: BorshSerialize, Pubkey: BorshSerialize, Data: BorshSerialize, bool: BorshSerialize, Option<u8>: BorshSerialize, Option<TokenStandard>: BorshSerialize, Option<Collection>: BorshSerialize, Option<Uses>: BorshSerialize, Option<CollectionDetails>: BorshSerialize, Option<ProgrammableConfig>: BorshSerialize,
source§impl PartialEq<Metadata> for Metadata
impl PartialEq<Metadata> for Metadata
source§impl TokenMetadataAccount for Metadata
impl TokenMetadataAccount for Metadata
fn key() -> Key
fn size() -> usize
fn is_correct_account_type( data: &[u8], data_type: Key, data_size: usize ) -> bool
fn pad_length(buf: &mut Vec<u8>) -> Result<(), MetadataError>
fn safe_deserialize(data: &[u8]) -> Result<Self, BorshError>
fn from_account_info(a: &AccountInfo<'_>) -> Result<Self, ProgramError>
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§
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