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,

Source

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,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T, X> IntoConcurrentIter for RawJagged<T, X>
where T: Send + Sync, X: JaggedIndexer,

Source§

type Item = T

Type of the element that the concurrent iterator yields.
Source§

type IntoIter = ConIterJaggedOwned<T, X>

Type of the concurrent iterator that this type can be converted into.
Source§

fn into_con_iter(self) -> Self::IntoIter

Trait to convert a source (collection or generator) into a concurrent iterator; i.e., ConcurrentIter, using its into_con_iter method. Read more

Auto Trait Implementations§

§

impl<T, X> Freeze for RawJagged<T, X>
where X: Freeze,

§

impl<T, X> RefUnwindSafe for RawJagged<T, X>

§

impl<T, X> !Send for RawJagged<T, X>

§

impl<T, X> !Sync for RawJagged<T, X>

§

impl<T, X> Unpin for RawJagged<T, X>
where X: Unpin,

§

impl<T, X> UnwindSafe for RawJagged<T, X>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SoM<T> for T

Source§

fn get_ref(&self) -> &T

Returns a reference to self.
Source§

fn get_mut(&mut self) -> &mut T

Returns a mutable reference to self.
Source§

impl<T> SoR<T> for T

Source§

fn get_ref(&self) -> &T

Returns a reference to self.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.