pub trait CircularArrayIndex<'a, const N: usize, T: 'a> {
// Required methods
fn iter(&'a self) -> impl Iterator<Item = &'a T>;
fn iter_raw(&'a self) -> impl Iterator<Item = &'a T>;
fn iter_index(
&'a self,
axis: usize,
index: usize,
) -> impl Iterator<Item = &'a T>;
fn iter_index_raw(
&'a self,
axis: usize,
index: usize,
) -> impl Iterator<Item = &'a T>;
fn iter_range(
&'a self,
axis: usize,
range: Range<usize>,
) -> impl Iterator<Item = &'a T>;
fn iter_range_raw(
&'a self,
axis: usize,
range: Range<usize>,
) -> impl Iterator<Item = &'a T>;
fn iter_slice(
&'a self,
slice: [Range<usize>; N],
) -> impl Iterator<Item = &'a T>;
fn get(&'a self, index: [usize; N]) -> &'a T;
fn get_raw(&'a self, index: [usize; N]) -> &'a T;
}Expand description
Methods for retrieving elements from the array.
Required Methods§
Sourcefn iter(&'a self) -> impl Iterator<Item = &'a T>
fn iter(&'a self) -> impl Iterator<Item = &'a T>
Iterate over all elements of the inner array, aligned to the offset.
Sourcefn iter_raw(&'a self) -> impl Iterator<Item = &'a T>
fn iter_raw(&'a self) -> impl Iterator<Item = &'a T>
Iterate over all elements of the inner array.
Sourcefn iter_index(
&'a self,
axis: usize,
index: usize,
) -> impl Iterator<Item = &'a T>
fn iter_index( &'a self, axis: usize, index: usize, ) -> impl Iterator<Item = &'a T>
Iterate over all elements of index for the given axis aligned to the offset.
Sourcefn iter_index_raw(
&'a self,
axis: usize,
index: usize,
) -> impl Iterator<Item = &'a T>
fn iter_index_raw( &'a self, axis: usize, index: usize, ) -> impl Iterator<Item = &'a T>
Iterate over all elements of index for the given axis.
Sourcefn iter_range(
&'a self,
axis: usize,
range: Range<usize>,
) -> impl Iterator<Item = &'a T>
fn iter_range( &'a self, axis: usize, range: Range<usize>, ) -> impl Iterator<Item = &'a T>
Iterate over all elements of the given index range for the given axis
aligned to the offset.
Sourcefn iter_range_raw(
&'a self,
axis: usize,
range: Range<usize>,
) -> impl Iterator<Item = &'a T>
fn iter_range_raw( &'a self, axis: usize, range: Range<usize>, ) -> impl Iterator<Item = &'a T>
Iterate over all elements of the given index range for the given axis.
Sourcefn iter_slice(&'a self, slice: [Range<usize>; N]) -> impl Iterator<Item = &'a T>
fn iter_slice(&'a self, slice: [Range<usize>; N]) -> impl Iterator<Item = &'a T>
Iterate over all elements of the given index slice.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.