Function nstd_sys::vec::nstd_vec_set_len
source · #[no_mangle]
pub unsafe extern "C" fn nstd_vec_set_len(
vec: &mut NSTDVec<'_>,
len: NSTDUInt
)Available on crate feature
vec only.Expand description
Sets a vectors length.
Parameters:
-
NSTDVec *vec- The vector. -
NSTDUInt len- The new length for the vector.
Safety
-
If
lenis greater than the vector’s current length, care must be taken to ensure that the new elements are properly initialized. -
len’s value must not be greater than the vector’s capacity.