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>,
}
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
Implementations
sourceimpl Metadata
impl Metadata
pub fn from_account_info(a: &AccountInfo<'_>) -> Result<Metadata, ProgramError>
Trait Implementations
sourceimpl BorshDeserialize for Metadata where
Key: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Data: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
Option<u8>: BorshDeserialize,
Option<TokenStandard>: BorshDeserialize,
Option<Collection>: BorshDeserialize,
Option<Uses>: BorshDeserialize,
impl BorshDeserialize for Metadata where
Key: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Data: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
Option<u8>: BorshDeserialize,
Option<TokenStandard>: BorshDeserialize,
Option<Collection>: BorshDeserialize,
Option<Uses>: BorshDeserialize,
sourceimpl BorshSerialize for Metadata where
Key: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Data: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
Option<u8>: BorshSerialize,
Option<TokenStandard>: BorshSerialize,
Option<Collection>: BorshSerialize,
Option<Uses>: BorshSerialize,
impl BorshSerialize for Metadata where
Key: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Data: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
Option<u8>: BorshSerialize,
Option<TokenStandard>: BorshSerialize,
Option<Collection>: BorshSerialize,
Option<Uses>: BorshSerialize,
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
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more