#[repr(u8)]pub enum CpiGuardInstruction {
Enable = 0,
Disable = 1,
}
Expand description
CPI Guard extension instructions
Variants§
Enable = 0
Lock certain token operations from taking place within CPI for this Account, namely:
- Transfer and Burn must go through a delegate.
- CloseAccount can only return lamports to owner.
- SetAuthority can only be used to remove an existing close authority.
- Approve is disallowed entirely.
In addition, CPI Guard cannot be enabled or disabled via CPI.
Accounts expected by this instruction:
[writable]
The account to update.[signer]
The account’s owner.
- Multisignature authority
[writable]
The account to update.[]
The account’s multisignature owner.- ..2+M
[signer]
M signer accounts.
Disable = 1
Allow all token operations to happen via CPI as normal.
Implicitly initializes the extension in the case where it is not present.
Accounts expected by this instruction:
[writable]
The account to update.[signer]
The account’s owner.
- Multisignature authority
[writable]
The account to update.[]
The account’s multisignature owner.- ..2+M
[signer]
M signer accounts.
Trait Implementations§
source§impl Clone for CpiGuardInstruction
impl Clone for CpiGuardInstruction
source§fn clone(&self) -> CpiGuardInstruction
fn clone(&self) -> CpiGuardInstruction
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 CpiGuardInstruction
impl Debug for CpiGuardInstruction
source§impl From<CpiGuardInstruction> for u8
impl From<CpiGuardInstruction> for u8
source§fn from(enum_value: CpiGuardInstruction) -> Self
fn from(enum_value: CpiGuardInstruction) -> Self
Converts to this type from the input type.
source§impl PartialEq for CpiGuardInstruction
impl PartialEq for CpiGuardInstruction
source§fn eq(&self, other: &CpiGuardInstruction) -> bool
fn eq(&self, other: &CpiGuardInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for CpiGuardInstruction
impl TryFrom<u8> for CpiGuardInstruction
§type Error = TryFromPrimitiveError<CpiGuardInstruction>
type Error = TryFromPrimitiveError<CpiGuardInstruction>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for CpiGuardInstruction
impl TryFromPrimitive for CpiGuardInstruction
type Primitive = u8
type Error = TryFromPrimitiveError<CpiGuardInstruction>
const NAME: &'static str = "CpiGuardInstruction"
fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for CpiGuardInstruction
impl StructuralPartialEq for CpiGuardInstruction
Auto Trait Implementations§
impl RefUnwindSafe for CpiGuardInstruction
impl Send for CpiGuardInstruction
impl Sync for CpiGuardInstruction
impl Unpin for CpiGuardInstruction
impl UnwindSafe for CpiGuardInstruction
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