pub trait Dimension:
Clone
+ PartialEq
+ Eq
+ Debug
+ Send
+ Sync
+ 'static {
const NDIM: Option<usize>;
// Required methods
fn as_slice(&self) -> &[usize];
fn as_slice_mut(&mut self) -> &mut [usize];
// Provided methods
fn ndim(&self) -> usize { ... }
fn size(&self) -> usize { ... }
}Expand description
Trait for types that describe the dimensionality of an array.
Each dimension type knows its number of axes at the type level
(except IxDyn which carries it at runtime).
Required Associated Constants§
Required Methods§
Sourcefn as_slice_mut(&mut self) -> &mut [usize]
fn as_slice_mut(&mut self) -> &mut [usize]
Return the shape as a mutable slice.
Provided Methods§
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.