pub trait LoadZeroCopy {
    fn load<T: ZeroCopy + Owner>(&self) -> Result<&T>;
    fn load_fully_unchecked<T: ZeroCopy + Owner>(&self) -> Result<&T>;
}

Required Methods

Using AccountLoader forces a AccountInfo.clone() and then binds the loaded lifetime to the AccountLoader’s lifetime. This function avoids both. It checks the account owner and discriminator, then casts the data.

Same as load(), but doesn’t check the discriminator or owner.

Implementors