Available on crate feature
vec only.Expand description
A dynamically sized contiguous sequence of values.
Structs§
- NSTDVec
- A dynamically sized contiguous sequence of values.
Functions§
- nstd_
vec_ allocator - Returns an immutable reference to a vector’s allocator.
- nstd_
vec_ as_ ptr - Returns a pointer to a vector’s raw data.
- nstd_
vec_ as_ ptr_ mut - Returns a pointer to a vector’s raw data.
- nstd_
vec_ as_ slice - Returns an immutable slice containing all of a vector’s active elements.
- nstd_
vec_ as_ slice_ mut - Returns a slice containing all of a vector’s active elements.
- nstd_
vec_ cap - Returns a vector’s capacity.
- nstd_
vec_ clear - Sets a vector’s length to zero.
- nstd_
vec_ clone - Creates a new deep copy of
vec. - nstd_
vec_ ⚠drop - Frees an instance of
NSTDVecafter invokingcallbackwith each of the vector’s elements. - nstd_
vec_ end - Returns a pointer to the end of a vector.
- nstd_
vec_ end_ mut - Returns a mutable pointer to the end of a vector.
- nstd_
vec_ ⚠extend - Pushes a series of values onto a vector.
- nstd_
vec_ free - Frees an instance of
NSTDVec. - nstd_
vec_ ⚠from_ slice - Creates a new vector from a slice.
- nstd_
vec_ get - Returns an immutable pointer to the element at index
posinvec. - nstd_
vec_ get_ mut - Returns a pointer to the element at index
posinvec. - nstd_
vec_ ⚠insert - Attempts to insert a value into a vector at
index. - nstd_
vec_ len - Returns the length of a vector.
- nstd_
vec_ new - Creates a new vector without allocating any resources.
- nstd_
vec_ new_ with_ cap - Creates a new vector initialized with the given capacity.
- nstd_
vec_ pop - Removes the last value of a vector and returns a pointer to it.
- nstd_
vec_ ⚠push - 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. - nstd_
vec_ remove - Removes the element at
indexin a vector. - nstd_
vec_ reserve - Reserves some space on the heap for at least
sizemore elements to be pushed onto a vector without making more allocations. - nstd_
vec_ reserved - Returns the number of reserved elements within a vector’s inactive buffer.
- nstd_
vec_ ⚠set_ len - Sets a vectors length.
- nstd_
vec_ shrink - Decreases a vector’s capacity to match it’s length.
- nstd_
vec_ stride - Returns the amount of bytes each value in a vector occupies.
- nstd_
vec_ truncate - Shortens a vector, keeping the first
lenelements.
Type Aliases§
- NSTD
Optional Vec - Represents an optional value of type
NSTDVec.