nstd_core_slice_empty

Function nstd_core_slice_empty 

Source
#[unsafe(no_mangle)]
pub const extern "C" fn nstd_core_slice_empty( stride: NSTDUInt, align: NSTDUInt, ) -> NSTDSlice
Available on crate feature core only.
Expand description

Creates a new empty slice with a given stride.

§Parameters:

  • NSTDUInt stride - The number of bytes each element occupies.

  • NSTDUInt align - The alignment of each element in the slice.

§Returns

NSTDSlice slice - The new empty slice.

§Panics

This operation will panic if either align is not a power of two or stride is not a multiple of align.