IntoLayout

Trait IntoLayout 

Source
pub trait IntoLayout: AsRef<[usize]> + Debug {
    type Layout: MutLayout;

    // Required method
    fn into_layout(self) -> Self::Layout;
}
Expand description

Trait for shapes which can be used to create a contiguous layout.

This is implemented for [usize; N] for creating static-rank layouts from arrays, and &[usize] for creating dynamic-rank layouts from slices.

Required Associated Types§

Source

type Layout: MutLayout

The type of layout produced from this shape.

Required Methods§

Source

fn into_layout(self) -> Self::Layout

Convert this shape into a contiguous layout.

Implementations on Foreign Types§

Source§

impl IntoLayout for &[usize]

Source§

impl<const N: usize> IntoLayout for [usize; N]

Implementors§