Function spl_governance::tools::account::assert_is_valid_account[][src]

pub fn assert_is_valid_account<T: BorshDeserialize + PartialEq>(
    account_info: &AccountInfo<'_>,
    expected_account_type: T,
    owner_program_id: &Pubkey
) -> Result<(), ProgramError>
Expand description

Asserts the given account is not empty, owned by the given program and of the expected type Note: The function assumes the account type T is stored as the first element in the account data