#[repr(u8)]pub enum TransferHookInstruction {
Initialize = 0,
Update = 1,
}
Expand description
Transfer hook extension instructions
Variants§
Initialize = 0
Initialize a new mint with a transfer hook program.
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::extension::transfer_hook::instruction::InitializeInstructionData
Update = 1
Update the transfer hook program id. Only supported for mints that
include the TransferHook
extension.
Accounts expected by this instruction:
- Single authority
[writable]
The mint.[signer]
The transfer hook authority.
- Multisignature authority
[writable]
The mint.[]
The mint’s transfer hook authority.- ..2+M
[signer]
M signer accounts.
Data expected by this instruction:
crate::extension::transfer_hook::UpdateInstructionData
Trait Implementations§
source§impl Clone for TransferHookInstruction
impl Clone for TransferHookInstruction
source§fn clone(&self) -> TransferHookInstruction
fn clone(&self) -> TransferHookInstruction
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 Debug for TransferHookInstruction
impl Debug for TransferHookInstruction
source§impl From<TransferHookInstruction> for u8
impl From<TransferHookInstruction> for u8
source§fn from(enum_value: TransferHookInstruction) -> Self
fn from(enum_value: TransferHookInstruction) -> Self
Converts to this type from the input type.
source§impl PartialEq for TransferHookInstruction
impl PartialEq for TransferHookInstruction
source§fn eq(&self, other: &TransferHookInstruction) -> bool
fn eq(&self, other: &TransferHookInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for TransferHookInstruction
impl TryFrom<u8> for TransferHookInstruction
§type Error = TryFromPrimitiveError<TransferHookInstruction>
type Error = TryFromPrimitiveError<TransferHookInstruction>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for TransferHookInstruction
impl TryFromPrimitive for TransferHookInstruction
type Primitive = u8
type Error = TryFromPrimitiveError<TransferHookInstruction>
const NAME: &'static str = "TransferHookInstruction"
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for TransferHookInstruction
impl StructuralPartialEq for TransferHookInstruction
Auto Trait Implementations§
impl Freeze for TransferHookInstruction
impl RefUnwindSafe for TransferHookInstruction
impl Send for TransferHookInstruction
impl Sync for TransferHookInstruction
impl Unpin for TransferHookInstruction
impl UnwindSafe for TransferHookInstruction
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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