Enum spl_token_2022::extension::default_account_state::instruction::DefaultAccountStateInstruction
source · #[repr(u8)]pub enum DefaultAccountStateInstruction {
Initialize = 0,
Update = 1,
}
Expand description
Default Account State extension instructions
Variants§
Initialize = 0
Initialize a new mint with the default state for new Accounts.
Fails if the mint has already been initialized, so must be called before
InitializeMint
.
The mint must have exactly enough space allocated for the base mint (82 bytes), plus 83 bytes of padding, 1 byte reserved for the account type, then space required for this extension, plus any others.
Accounts expected by this instruction:
[writable]
The mint to initialize.
Data expected by this instruction:
crate::state::AccountState
Update = 1
Update the default state for new Accounts. Only supported for mints that
include the DefaultAccountState
extension.
Accounts expected by this instruction:
- Single authority
[writable]
The mint.[signer]
The mint freeze authority.
- Multisignature authority
[writable]
The mint.[]
The mint’s multisignature freeze authority.- ..2+M
[signer]
M signer accounts.
Data expected by this instruction:
crate::state::AccountState
Trait Implementations§
source§impl Clone for DefaultAccountStateInstruction
impl Clone for DefaultAccountStateInstruction
source§fn clone(&self) -> DefaultAccountStateInstruction
fn clone(&self) -> DefaultAccountStateInstruction
Returns a copy 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 From<DefaultAccountStateInstruction> for u8
impl From<DefaultAccountStateInstruction> for u8
source§fn from(enum_value: DefaultAccountStateInstruction) -> Self
fn from(enum_value: DefaultAccountStateInstruction) -> Self
Converts to this type from the input type.
source§impl PartialEq for DefaultAccountStateInstruction
impl PartialEq for DefaultAccountStateInstruction
source§fn eq(&self, other: &DefaultAccountStateInstruction) -> bool
fn eq(&self, other: &DefaultAccountStateInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for DefaultAccountStateInstruction
impl TryFrom<u8> for DefaultAccountStateInstruction
§type Error = TryFromPrimitiveError<DefaultAccountStateInstruction>
type Error = TryFromPrimitiveError<DefaultAccountStateInstruction>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for DefaultAccountStateInstruction
impl TryFromPrimitive for DefaultAccountStateInstruction
type Primitive = u8
type Error = TryFromPrimitiveError<DefaultAccountStateInstruction>
const NAME: &'static str = "DefaultAccountStateInstruction"
fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for DefaultAccountStateInstruction
impl StructuralPartialEq for DefaultAccountStateInstruction
Auto Trait Implementations§
impl RefUnwindSafe for DefaultAccountStateInstruction
impl Send for DefaultAccountStateInstruction
impl Sync for DefaultAccountStateInstruction
impl Unpin for DefaultAccountStateInstruction
impl UnwindSafe for DefaultAccountStateInstruction
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