#[no_mangle]
pub extern "C" fn nstd_core_slice_new(
    ptr: NSTDAny,
    stride: NSTDUInt,
    len: NSTDUInt
) -> NSTDOptionalSlice
Available on crate feature nstd_core only.
Expand description

Creates a new slice from raw data.

Parameters:

  • NSTDAny ptr - A pointer to the first element in the sequence.

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

  • NSTDUInt len - The number of elements in the sequence.

Returns

NSTDOptionalSlice slice - The new slice on success, or an uninitialized “none” variant if either ptr is null or the slice’s length in bytes would exceed NSTDInt’s max value.