Struct fera_array::NestedArray

source ·
pub struct NestedArray<T, S, M, N> { /* private fields */ }
Expand description

An Array implemented as an array of arrays.

It contains a main Array of type M. Each element (nested array) of the main array is an Array of type N. The type of the elements of the nested arrays is T.

This type offers a flatted view of the elements in the nested arrays. Each time an element at a specified index is accessed, the index is decomposed in two indices (using S: Split), the first one is used to index the main array and the second one to index the nested array.

This type is interesting to implemented copy on write arrays. See CowNestedArray.

Trait Implementations

Creates a new array with n repeated value.
Returns the number of elements in the array.
Returns a reference to the element of the array at index, without doing bounds checking.
Returns a mutable reference to the element of the array at index, without doing bounds checking. Read more
Returns true if the length of the array is 0, otherwise false.
Returns a reference to the element of the array at index, or None if the index is out of bounds. Read more
Returns a mutable reference to the element of the array at index, or None if the index is out of bounds. Read more
Returns a iterator over the array.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Creates a array with the specified capacity. Read more
Returns the capacity of the array.
Change the length of the array.
Reserve capacity for at least additional more elements. Read more
Write value to the end of the array and increment the length. Read more
Appends the value to the array. Read more
Appends all elements of iter to the array. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.