pub unsafe trait SliceArg<D: Dimension>: AsRef<[SliceInfoElem]> {
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.