Struct mpl_token_metadata::accounts::Metadata
source · pub struct Metadata {Show 16 fields
pub key: Key,
pub update_authority: Pubkey,
pub mint: Pubkey,
pub name: String,
pub symbol: String,
pub uri: String,
pub seller_fee_basis_points: u16,
pub creators: Option<Vec<Creator>>,
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
§mint: Pubkey
§name: String
§symbol: String
§uri: String
§seller_fee_basis_points: u16
§creators: Option<Vec<Creator>>
§primary_sale_happened: bool
§is_mutable: bool
§edition_nonce: Option<u8>
§token_standard: Option<TokenStandard>
§collection: Option<Collection>
§uses: Option<Uses>
§collection_details: Option<CollectionDetails>
§programmable_config: Option<ProgrammableConfig>
Implementations§
source§impl Metadata
impl Metadata
sourcepub const PREFIX: &'static [u8] = _
pub const PREFIX: &'static [u8] = _
Prefix values used to generate a PDA for this account.
Values are positional and appear in the following order:
Metadata::PREFIX
crate::MPL_TOKEN_METADATA_ID
- mint (
Pubkey
)
pub fn create_pda(mint: Pubkey, bump: u8) -> Result<Pubkey, PubkeyError>
pub fn find_pda(mint: &Pubkey) -> (Pubkey, u8)
pub fn from_bytes(data: &[u8]) -> Result<Self, Error>
Trait Implementations§
source§impl BorshDeserialize for Metadatawhere
Key: BorshDeserialize,
Pubkey: BorshDeserialize,
String: BorshDeserialize,
u16: BorshDeserialize,
Option<Vec<Creator>>: BorshDeserialize,
bool: BorshDeserialize,
Option<u8>: BorshDeserialize,
Option<TokenStandard>: BorshDeserialize,
Option<Collection>: BorshDeserialize,
Option<Uses>: BorshDeserialize,
Option<CollectionDetails>: BorshDeserialize,
Option<ProgrammableConfig>: BorshDeserialize,
impl BorshDeserialize for Metadatawhere
Key: BorshDeserialize,
Pubkey: BorshDeserialize,
String: BorshDeserialize,
u16: BorshDeserialize,
Option<Vec<Creator>>: BorshDeserialize,
bool: BorshDeserialize,
Option<u8>: BorshDeserialize,
Option<TokenStandard>: BorshDeserialize,
Option<Collection>: BorshDeserialize,
Option<Uses>: BorshDeserialize,
Option<CollectionDetails>: BorshDeserialize,
Option<ProgrammableConfig>: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn 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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for Metadatawhere
Key: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
u16: BorshSerialize,
Option<Vec<Creator>>: 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,
String: BorshSerialize,
u16: BorshSerialize,
Option<Vec<Creator>>: BorshSerialize,
bool: BorshSerialize,
Option<u8>: BorshSerialize,
Option<TokenStandard>: BorshSerialize,
Option<Collection>: BorshSerialize,
Option<Uses>: BorshSerialize,
Option<CollectionDetails>: BorshSerialize,
Option<ProgrammableConfig>: BorshSerialize,
source§impl PartialEq for Metadata
impl PartialEq for Metadata
source§impl<'a> TryFrom<&AccountInfo<'a>> for Metadata
impl<'a> TryFrom<&AccountInfo<'a>> for Metadata
impl Eq 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more