pub enum MetadataInstruction {
CreateMetadata {
name: String,
symbol: String,
image: String,
description: String,
immutable: bool,
},
UpdateMetadata {
name: Option<String>,
symbol: Option<String>,
image: Option<String>,
description: Option<String>,
},
CreateAttributes {
data: Vec<(String, String)>,
},
ReplaceAttributes {
data: Vec<(String, String)>,
},
TransferAuthority {
new_authority: Pubkey,
},
MakeImmutable,
}Expand description
Instructions supported by the token metadata program.
Variants§
CreateMetadata
Create core metadata for a token
Fields
UpdateMetadata
Update core metadata
Fields
CreateAttributes
Create metadata attributes
ReplaceAttributes
Replace metadata attributes
TransferAuthority
Transfer update authority (must provide a new authority)
Fields
New authority to transfer to
MakeImmutable
Make metadata immutable (revoke update authority)
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for MetadataInstruction
impl BorshDeserialize for MetadataInstruction
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 MetadataInstruction
impl BorshSerialize for MetadataInstruction
Source§impl Clone for MetadataInstruction
impl Clone for MetadataInstruction
Source§fn clone(&self) -> MetadataInstruction
fn clone(&self) -> MetadataInstruction
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 MetadataInstruction
impl Debug for MetadataInstruction
Source§impl EnumExt for MetadataInstruction
impl EnumExt for MetadataInstruction
Source§impl PartialEq for MetadataInstruction
impl PartialEq for MetadataInstruction
impl StructuralPartialEq for MetadataInstruction
Auto Trait Implementations§
impl Freeze for MetadataInstruction
impl RefUnwindSafe for MetadataInstruction
impl Send for MetadataInstruction
impl Sync for MetadataInstruction
impl Unpin for MetadataInstruction
impl UnwindSafe for MetadataInstruction
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