Function load_system_account

Source
pub unsafe fn load_system_account(
    info: &AccountInfo,
    is_writable: bool,
) -> Result<(), ProgramError>
Expand description

Loads the account as a system account, returning an error if it is not or if it is not writable while expected to be.

§Arguments

  • info - The account to load the system account from
  • is_writable - Whether the account should be writable

§Returns

  • Result<(), ProgramError> - The result of the operation

§Safety