pub fn next_optional_account_info<'a, 'b, I: Iterator<Item = &'a AccountInfo<'b>>>(
iter: &mut I
) -> Result<Option<I::Item>, ProgramError>
Expand description
Convenience function for accessing the next item in an AccountInfo
iterator and validating whether the account is present or not.
This relies on the client setting the crate::id()
as the pubkey for
accounts that are not set, which effectively allows us to use positional
optional accounts.