Trait anchor_lang::AccountsInit
source · [−]pub trait AccountsInit<'info>: ToAccountMetas + ToAccountInfos<'info> + Sized {
fn try_accounts_init(
program_id: &Pubkey,
accounts: &mut &[AccountInfo<'info>]
) -> Result<Self, ProgramError>;
}
Expand description
A data structure of accounts providing a one time deserialization upon
account initialization, i.e., when the data array for a given account is
zeroed. Any subsequent call to try_accounts_init
should fail. For all
subsequent deserializations, it’s expected that Accounts
is used.