pub struct EnableCpiGuard<'a> {
pub account: &'a AccountView<'a>,
pub owner: &'a AccountView<'a>,
}Expand description
CpiGuardExtension::Enable (34/0): the account refuses transfers,
approvals, burns, and close from inside a CPI unless a PDA of the
calling program owns it.
Fields§
§account: &'a AccountView<'a>§owner: &'a AccountView<'a>Implementations§
Source§impl EnableCpiGuard<'_>
impl EnableCpiGuard<'_>
Sourcepub fn invoke(&self) -> ProgramResult
pub fn invoke(&self) -> ProgramResult
Send this instruction to Token-2022 with the authority
signed directly. Fails with MissingRequiredSignature
before the CPI if it is not.
Sourcepub fn invoke_signed(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
pub fn invoke_signed(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
Send this instruction to Token-2022 with PDA signers.
Sourcepub fn invoke_multisig(
&self,
multisig_signers: &[&AccountView<'_>],
) -> ProgramResult
pub fn invoke_multisig( &self, multisig_signers: &[&AccountView<'_>], ) -> ProgramResult
Send this instruction to Token-2022 with a multisig authority whose signers signed directly.
Sourcepub fn invoke_signed_multisig(
&self,
multisig_signers: &[&AccountView<'_>],
signers: &[Signer<'_, '_>],
) -> ProgramResult
pub fn invoke_signed_multisig( &self, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Send this instruction to Token-2022 with a multisig authority and PDA signers.
Trait Implementations§
Source§impl<'a, 'x: 'a> TokenInstruction<'a> for EnableCpiGuard<'x>
impl<'a, 'x: 'a> TokenInstruction<'a> for EnableCpiGuard<'x>
fn emit( &self, multisig_signers: &[&'a AccountView<'a>], sink: &mut impl TokenSink<'a>, ) -> ProgramResult
Auto Trait Implementations§
impl<'a> !Send for EnableCpiGuard<'a>
impl<'a> !Sync for EnableCpiGuard<'a>
impl<'a> Freeze for EnableCpiGuard<'a>
impl<'a> RefUnwindSafe for EnableCpiGuard<'a>
impl<'a> Unpin for EnableCpiGuard<'a>
impl<'a> UnsafeUnpin for EnableCpiGuard<'a>
impl<'a> UnwindSafe for EnableCpiGuard<'a>
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