Trait ArrayKind

Source
pub trait ArrayKind: Sized {
    type Type<T>;
    type I: Clone + PartialEq + Ord + Debug + One + Zero + Add<Output = Self::I> + Sub<Output = Self::I> + for<'a> Add<&'a Self::Index, Output = Self::Index>;
    type Index: NaturalArray<Self> + Into<Self::Type<Self::I>> + From<Self::Type<Self::I>> + AsRef<Self::Type<Self::I>> + AsMut<Self::Type<Self::I>> + PartialEq;
    type Slice<'a, T: 'a>;
}
Expand description

Array kinds. For example, super::vec::VecKind is the set of types Vec<T> for all T.

Required Associated Types§

Source

type Type<T>

The type of arrays containing elements type T

Source

type I: Clone + PartialEq + Ord + Debug + One + Zero + Add<Output = Self::I> + Sub<Output = Self::I> + for<'a> Add<&'a Self::Index, Output = Self::Index>

The type of index elements. For super::vec::VecKind, this is usize.

Source

type Index: NaturalArray<Self> + Into<Self::Type<Self::I>> + From<Self::Type<Self::I>> + AsRef<Self::Type<Self::I>> + AsMut<Self::Type<Self::I>> + PartialEq

Arrays of indices (isomorphic to Type<I>) must implement NaturalArray

Source

type Slice<'a, T: 'a>

a Slice is a read-only view into another array’s data. For VecKind this is &[T].

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.

Implementors§