Enum spl_token_2022::extension::default_account_state::instruction::DefaultAccountStateInstruction
source · [−]#[repr(u8)]
pub enum DefaultAccountStateInstruction {
Initialize,
Update,
}
Expand description
Default Account State extension instructions
Variants
Initialize
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
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
sourceimpl Clone for DefaultAccountStateInstruction
impl Clone for DefaultAccountStateInstruction
sourcefn clone(&self) -> DefaultAccountStateInstruction
fn clone(&self) -> DefaultAccountStateInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl From<DefaultAccountStateInstruction> for u8
impl From<DefaultAccountStateInstruction> for u8
sourcefn from(enum_value: DefaultAccountStateInstruction) -> Self
fn from(enum_value: DefaultAccountStateInstruction) -> Self
Performs the conversion.
sourceimpl TryFrom<u8> for DefaultAccountStateInstruction
impl TryFrom<u8> for DefaultAccountStateInstruction
type Error = TryFromPrimitiveError<Self>
type Error = TryFromPrimitiveError<Self>
The type returned in the event of a conversion error.
sourcefn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for DefaultAccountStateInstruction
impl TryFromPrimitive for DefaultAccountStateInstruction
type Primitive = u8
const NAME: &'static str
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
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more