pub struct CloseAccount<'a> {
pub account: &'a AccountView,
pub destination: &'a AccountView,
pub authority: &'a AccountView,
}Expand description
Close an account by transferring all its SOL to the destination account.
§Accounts:
[WRITE]The account to close.[WRITE]The destination account.[SIGNER]The account’s owner.
Fields§
§account: &'a AccountViewToken Account.
destination: &'a AccountViewDestination Account
Owner Account
Implementations§
Source§impl CloseAccount<'_>
impl CloseAccount<'_>
pub fn invoke(&self) -> Result<(), ProgramError>
pub fn invoke_signed( &self, signers: &[Signer<'_, '_>], ) -> Result<(), ProgramError>
Auto Trait Implementations§
impl<'a> Freeze for CloseAccount<'a>
impl<'a> RefUnwindSafe for CloseAccount<'a>
impl<'a> !Send for CloseAccount<'a>
impl<'a> !Sync 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