solana_program_entrypoint

Function deserialize_into

Source
pub unsafe fn deserialize_into<'a>(
    input: *mut u8,
    accounts: &mut [MaybeUninit<AccountInfo<'a>>],
) -> (&'a Pubkey, usize, &'a [u8])
Expand description

Deserialize the input arguments

Differs from deserialize by writing the account infos into an uninitialized slice, which provides better performance, roughly 30 CUs per unique account provided to the instruction.

Panics if the input slice is not large enough.

The integer arithmetic in this method is safe when called on a buffer that was serialized by runtime. Use with buffers serialized otherwise is unsupported and done at one’s own risk.

§Safety