Skip to main content

align_buffer

Function align_buffer 

Source
pub fn align_buffer<B: SplitByteSlice>(buffer: B) -> Result<B, ZbiError>
Expand description

Aligns provided slice to ZBI_ALIGNMENT_USIZE bytes.

ยงReturns

  • Ok(aligned_slice) - on success, which can have length == 0
  • ZbiError::TooBig - returned if there is not enough space to align the slice