Skip to main content

AccountsClose

Trait AccountsClose 

Source
pub trait AccountsClose<'info>: ToAccountInfos<'info> {
    // Required method
    fn close(&self, sol_destination: AccountInfo<'info>) -> Result<()>;
}
Expand description

The close procedure to initiate garabage collection of an account, allowing one to retrieve the rent exemption.

Required Methods§

Source

fn close(&self, sol_destination: AccountInfo<'info>) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'info, T: AccountsClose<'info>> AccountsClose<'info> for Box<T>

Source§

fn close(&self, sol_destination: AccountInfo<'info>) -> Result<()>

Source§

impl<'info, T: AccountsClose<'info>> AccountsClose<'info> for Option<T>

Source§

fn close(&self, sol_destination: AccountInfo<'info>) -> Result<()>

Implementors§

Source§

impl<'info, T: AccountSerialize + AccountDeserialize + Clone> AccountsClose<'info> for Account<'info, T>

Source§

impl<'info, T: AccountSerialize + AccountDeserialize + Clone> AccountsClose<'info> for InterfaceAccount<'info, T>

Source§

impl<'info, T: ZeroCopy + Owner> AccountsClose<'info> for AccountLoader<'info, T>