pub trait SizeArray:
Clone
+ Debug
+ PartialEq<Self> {
// Required methods
fn len(&self) -> usize;
fn get(&self, index: usize) -> Option<usize>;
fn iter(&self) -> impl ExactSizeIterator<Item = usize> + DoubleEndedIterator;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Array of dimension sizes or strides.
This trait is an abstraction around slices and arrays of usizes. Unlike
AsRef<[usize]> this does not require the data to actually be stored in
memory. This allows for strides which are computed on-demand or stored in a
smaller data type (eg. u32) and expanded to usize.
Required Methods§
Sourcefn iter(&self) -> impl ExactSizeIterator<Item = usize> + DoubleEndedIterator
fn iter(&self) -> impl ExactSizeIterator<Item = usize> + DoubleEndedIterator
Return an iterator over the entries.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".