solana_sdk::sysvar::instructions

Function load_current_index_checked

source
pub fn load_current_index_checked(
    instruction_sysvar_account_info: &AccountInfo<'_>,
) -> Result<u16, ProgramError>
Expand description

Load the current Instruction’s index in the currently executing Transaction.

§Errors

Returns ProgramError::UnsupportedSysvar if the given account’s ID is not equal to ID.