pub fn limited_deserialize<T>(
    instruction_data: &[u8],
    limit: u64
) -> Result<T, InstructionError>where
    T: DeserializeOwned,
Expand description

Deserialize with a limit based the maximum amount of data a program can expect to get. This function should be used in place of direct deserialization to help prevent OOM errors