pub unsafe trait SliceArg<D>: AsRef<[SliceInfoElem]>where
D: Dimension,{
type OutDim: Dimension;
// Required methods
fn in_ndim(&self) -> usize;
fn out_ndim(&self) -> usize;
}Expand description
A type that can slice an array of dimension D.
This trait is unsafe to implement because the implementation must ensure
that D, Self::OutDim, self.in_dim(), and self.out_ndim() are
consistent with the &[SliceInfoElem] returned by self.as_ref() and that
self.as_ref() always returns the same value when called multiple times.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".