Module nstd_sys::vec

source ·
Available on crate feature nstd_vec only.
Expand description

A dynamically sized contiguous sequence of values.

Structs

A dynamically sized contiguous sequence of values.

Functions

Returns a pointer to a vector’s raw data.
Returns a pointer to a vector’s raw data.
Returns an immutable slice containing all of a vector’s active elements.
Returns a slice containing all of a vector’s active elements.
Returns a vector’s capacity.
Sets a vector’s length to zero.
Creates a new deep copy of vec.
Pushes a series of values onto a vector.
Frees an instance of NSTDVec.
Creates a new vector from a slice.
Returns an immutable pointer to the element at index pos in vec.
Returns a pointer to the element at index pos in vec.
Attempts to insert a value into a vector at index.
Returns the length of a vector.
Creates a new vector without allocating any resources.
Creates a new vector initialized with the given capacity.
Removes the last value of a vector and returns a pointer to it.
Pushes a value onto a vector by copying bytes to the end of the vector’s buffer. The number of bytes to push is determined by vec’s stride.
Removes the element at index in a vector.
Reserves some space on the heap for at least size more elements to be pushed onto a vector without making more allocations.
Decreases a vector’s capacity to match it’s length.
Returns the amount of bytes each value in a vector occupies.
Shortens a vector, keeping the first len elements.