pub struct CloseAccount<'a> {
pub account: &'a AccountView<'a>,
pub destination: &'a AccountView<'a>,
pub authority: &'a AccountView<'a>,
}Expand description
Builder for SPL Token CloseAccount (instruction index 9).
Fields§
§account: &'a AccountView<'a>§destination: &'a AccountView<'a>Implementations§
Source§impl CloseAccount<'_>
impl CloseAccount<'_>
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
pub fn invoke_multisig( &self, multisig_signers: &[&AccountView<'_>], ) -> ProgramResult
pub fn invoke_signed_multisig( &self, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Source§impl CloseAccount<'_>
impl CloseAccount<'_>
Sourcepub fn invoke_on(
&self,
program: TokenProgram,
multisig_signers: &[&AccountView<'_>],
signers: &[Signer<'_, '_>],
) -> ProgramResult
pub fn invoke_on( &self, program: TokenProgram, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Send this instruction to an explicit token program.
multisig_signers is empty for a single-key authority; when
signers is empty the authority (or every multisig signer)
must have signed the transaction directly.
Sourcepub fn invoke_for_owner(
&self,
multisig_signers: &[&AccountView<'_>],
signers: &[Signer<'_, '_>],
) -> ProgramResult
pub fn invoke_for_owner( &self, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Send this instruction to whichever token program owns
account
(one 32-byte compare). Any other owner is refused with
IncorrectProgramId before the CPI.
Trait Implementations§
Source§impl<'a, 'x: 'a> TokenInstruction<'a> for CloseAccount<'x>
impl<'a, 'x: 'a> TokenInstruction<'a> for CloseAccount<'x>
fn emit( &self, multisig_signers: &[&'a AccountView<'a>], sink: &mut impl TokenSink<'a>, ) -> ProgramResult
Auto Trait Implementations§
impl<'a> !Send for CloseAccount<'a>
impl<'a> !Sync for CloseAccount<'a>
impl<'a> Freeze for CloseAccount<'a>
impl<'a> RefUnwindSafe for CloseAccount<'a>
impl<'a> Unpin for CloseAccount<'a>
impl<'a> UnsafeUnpin for CloseAccount<'a>
impl<'a> UnwindSafe for CloseAccount<'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