pub fn load_instruction_at_checked(
    index: usize,
    instruction_sysvar_account_info: &AccountInfo,
) -> Result<Instruction, ProgramError> {
    if !check_id(instruction_sysvar_account_info.key) {
        return Err(ProgramError::UnsupportedSysvar);
    }

    let instruction_sysvar = instruction_sysvar_account_info.try_borrow_data()?;
    crate::message::Message::deserialize_instruction(index, &instruction_sysvar).map_err(|err| {
        match err {
            SanitizeError::IndexOutOfBounds => ProgramError::InvalidArgument,
            _ => ProgramError::InvalidInstructionData,
        }
    })
}
/// Load an `Instruction` in the currently executing `Transaction` at the
/// specified index
Load an `Instruction` in the currently executing `Transaction` at the
specified index
Load an ` Instruction ` in the currently executing ` Transaction ` at the specified index
pub fn load_instruction_at_checked(
    index: usize,
    instruction_sysvar_account_info: &AccountInfo,
) -> Result<Instruction, ProgramError> {
    if !check_id(instruction_sysvar_account_info.key) {
        return Err(ProgramError::UnsupportedSysvar);
    }
    let instruction_sysvar = instruction_sysvar_account_info.try_borrow_data()?;
    crate::message::Message::deserialize_instruction(index, &instruction_sysvar).map_err(|err| {
        match err {
            SanitizeError::IndexOutOfBounds => ProgramError::InvalidArgument,
            _ => ProgramError::InvalidInstructionData,
        }
    })
}
pub fn load_instruction_at_checked ( index : usize , instruction_sysvar_account_info : & AccountInfo , ) -> Result < Instruction , ProgramError > { if ! check_id ( instruction_sysvar_account_info . key ) { return Err ( ProgramError :: UnsupportedSysvar ) ; } let instruction_sysvar = instruction_sysvar_account_info . try_borrow_data ( ) ? ; crate :: message :: Message :: deserialize_instruction ( index , & instruction_sysvar ) . map_err ( | err | { match err { SanitizeError :: IndexOutOfBounds => ProgramError :: InvalidArgument , _ => ProgramError :: InvalidInstructionData , } } ) }
Load an `Instruction` in the currently executing `Transaction` at the
specified index
Load an ` Instruction ` in the currently executing ` Transaction ` at the specified index
index
usize
instruction_sysvar_account_info
&AccountInfo
index
usize
instruction_sysvar_account_info
&AccountInfo