pub trait ArrayExt<T, const N: usize> {
// Required methods
fn each_ref_ext(&self) -> [&T; N];
fn each_mut_ext(&mut self) -> [&mut T; N];
fn try_map_ext<F, U, E>(self, f: F) -> Result<[U; N], E>
where F: FnMut(T) -> Result<U, E>;
fn zip_ext<U>(self, rhs: [U; N]) -> [(T, U); N];
}Expand description
Extension trait for arrays
Required Methods§
Sourcefn each_ref_ext(&self) -> [&T; N]
fn each_ref_ext(&self) -> [&T; N]
Stable replacement for each_ref
https://doc.rust-lang.org/std/primitive.array.html#method.each_ref
Sourcefn each_mut_ext(&mut self) -> [&mut T; N]
fn each_mut_ext(&mut self) -> [&mut T; N]
Stable replacement for each_mut
https://doc.rust-lang.org/std/primitive.array.html#method.each_mut
Sourcefn try_map_ext<F, U, E>(self, f: F) -> Result<[U; N], E>
fn try_map_ext<F, U, E>(self, f: F) -> Result<[U; N], E>
Stable replacement for try_map
https://doc.rust-lang.org/std/primitive.array.html#method.try_map
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.