SliceArg

Trait SliceArg 

Source
pub trait SliceArg {
    // Required method
    fn into_slices(self, shape: &Shape) -> Vec<Slice>;
}
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§

Source

fn into_slices(self, shape: &Shape) -> Vec<Slice>

Convert to an vec of slices with clamping to shape dimensions.

Returns a Slice for each dimension in shape.

Implementations on Foreign Types§

Source§

impl SliceArg for &Vec<Slice>

Source§

fn into_slices(self, shape: &Shape) -> Vec<Slice>

Source§

impl<S: Into<Slice> + Clone> SliceArg for &[S]

Source§

fn into_slices(self, shape: &Shape) -> Vec<Slice>

Source§

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

Source§

fn into_slices(self, shape: &Shape) -> Vec<Slice>

Implementors§

Source§

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