ShapeIdx

Trait ShapeIdx 

Source
pub trait ShapeIdx {
    type Idx<I: Index>: Unbind<I> + Ord + Eq;
    type IdxInc<I: Index>: Unbind<I> + Ord + Eq + From<Idx<Self, I>>;
    type MaybeIdx<I: Index>: Unbind<I::Signed> + Ord + Eq;
}
Expand description

base trait for Shape

Required Associated Types§

Source

type Idx<I: Index>: Unbind<I> + Ord + Eq

type that can be used to index into a range

Source

type IdxInc<I: Index>: Unbind<I> + Ord + Eq + From<Idx<Self, I>>

type that can be used to partition a range

Source

type MaybeIdx<I: Index>: Unbind<I::Signed> + Ord + Eq

either an index or a negative value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ShapeIdx for usize

Source§

type Idx<I: Index> = I

Source§

type IdxInc<I: Index> = I

Source§

type MaybeIdx<I: Index> = <I as Index>::Signed

Implementors§

Source§

impl ShapeIdx for One

Source§

impl<'dim> ShapeIdx for Dim<'dim>

Source§

type Idx<I: Index> = Idx<'dim, I>

Source§

type IdxInc<I: Index> = IdxInc<'dim, I>

Source§

type MaybeIdx<I: Index> = MaybeIdx<'dim, I>