Trait SliceArg

pub trait SliceArg<const D2: usize> {
    // Required method
    fn into_slices(self, shape: Shape) -> [Slice; D2];
}
Expand description

Trait for slice arguments that can be converted into an array of slices. This allows the slice method to accept both single slices (from s![..]) and arrays of slices (from s![.., ..] or [0..5, 1..3]).

Required Methods§

fn into_slices(self, shape: Shape) -> [Slice; D2]

Convert to an array of slices with clamping to shape dimensions

Implementations on Foreign Types§

§

impl<const D2: usize, T> SliceArg<D2> for [T; D2]
where T: Into<Slice>,

§

fn into_slices(self, shape: Shape) -> [Slice; D2]

Implementors§

§

impl<T> SliceArg<1> for T
where T: Into<Slice>,