Skip to main content

expand_zero_be_bytes

Function expand_zero_be_bytes 

Source
pub fn expand_zero_be_bytes<const MEM_SIZE: usize>(
    disk_bytes: &[u8],
) -> [u8; MEM_SIZE]
Expand description

Expands disk_bytes to MEM_SIZE, by adding zero bytes at the start of the slice. Used to zero-fill bytes that were discarded during serialization.

ยงPanics

  • if disk_bytes is longer than mem_len