1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#![no_std] use core::ops::IndexMut; pub trait Array: Sized + IndexMut<usize> where Self::Output: Sized, { type Item; const SIZE: usize; } impl<Item, const SIZE: usize> Array for [Item; SIZE] { type Item = Item; const SIZE: usize = SIZE; }