pub struct TokenMetadata {
pub is_initialized: bool,
pub mint: Pubkey,
pub name: String,
pub symbol: String,
pub image: String,
pub description: String,
pub update_authority: Option<Pubkey>,
}Expand description
Core metadata account - always present, optimized for performance
Fields§
§is_initialized: boolInitialization flag
mint: PubkeyThe mint address this metadata belongs to
name: StringThe name of the token
symbol: StringThe symbol of the token
image: StringThe image URI for the token
description: StringThe description of the token
Optional update authority for the metadata
Trait Implementations§
Source§impl BorshDeserialize for TokenMetadata
impl BorshDeserialize for TokenMetadata
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 TokenMetadata
impl BorshSerialize for TokenMetadata
Source§impl Clone for TokenMetadata
impl Clone for TokenMetadata
Source§fn clone(&self) -> TokenMetadata
fn clone(&self) -> TokenMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenMetadata
impl Debug for TokenMetadata
Source§impl IsInitialized for TokenMetadata
impl IsInitialized for TokenMetadata
Source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Is initialized
Source§impl Pack for TokenMetadata
impl Pack for TokenMetadata
Source§fn get_packed_len() -> usize
fn get_packed_len() -> usize
Get the packed length
Source§fn unpack(input: &[u8]) -> Result<Self, ProgramError>where
Self: IsInitialized,
fn unpack(input: &[u8]) -> Result<Self, ProgramError>where
Self: IsInitialized,
Unpack from slice and check if initialized
Source§fn unpack_unchecked(input: &[u8]) -> Result<Self, ProgramError>
fn unpack_unchecked(input: &[u8]) -> Result<Self, ProgramError>
Unpack from slice without checking if initialized
Source§impl PartialEq for TokenMetadata
impl PartialEq for TokenMetadata
impl Sealed for TokenMetadata
impl StructuralPartialEq for TokenMetadata
Auto Trait Implementations§
impl Freeze for TokenMetadata
impl RefUnwindSafe for TokenMetadata
impl Send for TokenMetadata
impl Sync for TokenMetadata
impl Unpin for TokenMetadata
impl UnwindSafe for TokenMetadata
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