pub struct UpdateTokenMetadataField {
pub field: TokenMetadataField,
pub value: String,
}Expand description
Updates a field in a token-metadata account.
The field can be one of the required fields (name, symbol, URI), or a totally new field denoted by a “key” string.
By the end of the instruction, the metadata account must be properly resized based on the new size of the TLV entry.
- If the new size is larger, the program must first reallocate to avoid overwriting other TLV entries.
- If the new size is smaller, the program must reallocate at the end so that it’s possible to iterate over TLV entries
Fields§
§field: TokenMetadataFieldField to update in the metadata.
value: StringValue to write for the field.
Implementations§
Trait Implementations§
Source§impl ArrangeAccounts for UpdateTokenMetadataField
impl ArrangeAccounts for UpdateTokenMetadataField
type ArrangedAccounts = UpdateTokenMetadataFieldInstructionAccounts
fn arrange_accounts(accounts: &[AccountMeta]) -> Option<Self::ArrangedAccounts>
Source§impl BorshDeserialize for UpdateTokenMetadataField
impl BorshDeserialize for UpdateTokenMetadataField
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 CarbonDeserialize for UpdateTokenMetadataField
impl CarbonDeserialize for UpdateTokenMetadataField
const DISCRIMINATOR: &'static [u8]
fn deserialize(data: &[u8]) -> Option<Self>
Source§impl Clone for UpdateTokenMetadataField
impl Clone for UpdateTokenMetadataField
Source§fn clone(&self) -> UpdateTokenMetadataField
fn clone(&self) -> UpdateTokenMetadataField
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 UpdateTokenMetadataField
impl Debug for UpdateTokenMetadataField
Source§impl PartialEq for UpdateTokenMetadataField
impl PartialEq for UpdateTokenMetadataField
impl StructuralPartialEq for UpdateTokenMetadataField
Auto Trait Implementations§
impl Freeze for UpdateTokenMetadataField
impl RefUnwindSafe for UpdateTokenMetadataField
impl Send for UpdateTokenMetadataField
impl Sync for UpdateTokenMetadataField
impl Unpin for UpdateTokenMetadataField
impl UnwindSafe for UpdateTokenMetadataField
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more