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>,
}
Fields
key: Key
mint: Pubkey
data: 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>
Item Details
Trait Implementations
sourceimpl BorshDeserialize for Metadata
impl BorshDeserialize for Metadata
sourcefn 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. Read more
sourcefn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
sourceimpl BorshSerialize for Metadatawhere
Key: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Data: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
Option<u8>: BorshSerialize,
Option<TokenStandard>: BorshSerialize,
Option<Collection>: BorshSerialize,
Option<Uses>: BorshSerialize,
Option<CollectionDetails>: BorshSerialize,
impl BorshSerialize for Metadatawhere
Key: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Data: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
Option<u8>: BorshSerialize,
Option<TokenStandard>: BorshSerialize,
Option<Collection>: BorshSerialize,
Option<Uses>: BorshSerialize,
Option<CollectionDetails>: BorshSerialize,
sourceimpl 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
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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