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§
Sourcetype 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 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
.
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.