pub trait NdArrayView<T>where
T: ArrayElement,{
type Iter<'a>: Iterator<Item = &'a T>
where Self: 'a,
T: 'a;
// Required methods
fn ndim(&self) -> usize;
fn dim(&self, index: usize) -> Result<usize, Error>;
fn as_slice(&self) -> Option<&[T]>;
fn iter(&self) -> Self::Iter<'_>;
}
Required Associated Types§
Required Methods§
Sourcefn dim(&self, index: usize) -> Result<usize, Error>
fn dim(&self, index: usize) -> Result<usize, Error>
Returns the size of the specified dimension.
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.
Implementations on Foreign Types§
Source§impl<T, D> NdArrayView<T> for ArrayView<'_, T, D>where
T: ArrayElement,
D: Dimension,
impl<T, D> NdArrayView<T> for ArrayView<'_, T, D>where
T: ArrayElement,
D: Dimension,
Source§impl<T: ArrayElement> NdArrayView<T> for &[T]
impl NdArrayView for one dimension slice
impl<T: ArrayElement> NdArrayView<T> for &[T]
impl NdArrayView for one dimension slice
Source§impl<T: ArrayElement> NdArrayView<T> for Vec<Vec<Vec<T>>>
impl NdArrayView for three dimensions vector
impl<T: ArrayElement> NdArrayView<T> for Vec<Vec<Vec<T>>>
impl NdArrayView for three dimensions vector
Source§impl<T: ArrayElement> NdArrayView<T> for Vec<Vec<T>>
impl NdArrayView for two dimensions vector
impl<T: ArrayElement> NdArrayView<T> for Vec<Vec<T>>
impl NdArrayView for two dimensions vector
Source§impl<T: ArrayElement> NdArrayView<T> for Vec<T>
impl NdArrayView for one dimension vector
impl<T: ArrayElement> NdArrayView<T> for Vec<T>
impl NdArrayView for one dimension vector
Source§impl<T: ArrayElement, const M: usize> NdArrayView<T> for &[[T; M]]
impl NdArrayView for two dimensions slices
impl<T: ArrayElement, const M: usize> NdArrayView<T> for &[[T; M]]
impl NdArrayView for two dimensions slices
Source§impl<T: ArrayElement, const M: usize, const N: usize> NdArrayView<T> for &[[[T; M]; N]]
impl<T: ArrayElement, const M: usize, const N: usize> NdArrayView<T> for &[[[T; M]; N]]
Source§impl<T: ArrayElement, const M: usize, const N: usize> NdArrayView<T> for [[T; M]; N]
impl NdArrayView for two dimensions array
impl<T: ArrayElement, const M: usize, const N: usize> NdArrayView<T> for [[T; M]; N]
impl NdArrayView for two dimensions array
Source§impl<T: ArrayElement, const M: usize, const N: usize, const L: usize> NdArrayView<T> for [[[T; M]; N]; L]
impl NdArrayView for three dimensions array
impl<T: ArrayElement, const M: usize, const N: usize, const L: usize> NdArrayView<T> for [[[T; M]; N]; L]
impl NdArrayView for three dimensions array
Source§impl<T: ArrayElement, const N: usize> NdArrayView<T> for [T; N]
impl NdArrayView for one dimension array
impl<T: ArrayElement, const N: usize> NdArrayView<T> for [T; N]
impl NdArrayView for one dimension array