pub struct RawJagged<T, X>where
X: JaggedIndexer,{ /* private fields */ }
Expand description
Raw representation of a jagged array.
Internally, the jagged array is stored as a vector of RawVec<T>
.
Further, jagged has an indexer which maps a flat-element-index to a two-dimensional index where the first is the index of the array and the second is the position of the element within this array.
Once dropped, the owned raw jagged array will drop the elements and allocation of its raw vectors.
Implementations§
Source§impl<T, X> RawJagged<T, X>where
X: JaggedIndexer,
impl<T, X> RawJagged<T, X>where
X: JaggedIndexer,
Sourcepub fn new(arrays: Vec<RawVec<T>>, indexer: X, total_len: Option<usize>) -> Self
pub fn new(arrays: Vec<RawVec<T>>, indexer: X, total_len: Option<usize>) -> Self
Creates the raw jagged array for the given arrays
and indexer
.
If the total number of elements in all arrays
is known, it can be passed in as total_len
,
which will be assumed to be correct.
If None
is passed as the total length, it will be computed as sum of all vectors.
Once the jagged array is dropped, the elements and allocation of the vectors will also be dropped.
Trait Implementations§
Source§impl<T, X> Drop for RawJagged<T, X>where
X: JaggedIndexer,
impl<T, X> Drop for RawJagged<T, X>where
X: JaggedIndexer,
Source§impl<T, X> IntoConcurrentIter for RawJagged<T, X>
impl<T, X> IntoConcurrentIter for RawJagged<T, X>
Source§type IntoIter = ConIterJaggedOwned<T, X>
type IntoIter = ConIterJaggedOwned<T, X>
Source§fn into_con_iter(self) -> Self::IntoIter
fn into_con_iter(self) -> Self::IntoIter
ConcurrentIter
,
using its into_con_iter
method. Read more