pub trait ArrayLike<Idx>: Index<Idx, Output = Self::Elem> + IndexMut<Idx, Output = Self::Elem> {
type Elem;
const LEN: usize;
// Required method
fn from_fn<F: FnMut(Idx) -> Self::Elem>(cb: F) -> Self;
}Expand description
A helper trait for array types which can be indexed and iterated, with
compile time known length. Use of this trait can be removed if generic_const_exprs
is ever stabilized.
Required Associated Constants§
Required Associated Types§
Required Methods§
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.