pub trait ArrayFromFn<T, const N: usize>: Array + AsSlice<Item = T> {
Show 14 methods
// Required methods
const fn from_fn<F>(fill: F) -> Self
where F: FnMut(usize) -> T;
const fn rfrom_fn<F>(fill: F) -> Self
where F: FnMut(usize) -> T;
const fn from_fn_boxed<F>(fill: F) -> Box<Self>
where F: FnMut(usize) -> T;
const fn rfrom_fn_boxed<F>(fill: F) -> Box<Self>
where F: FnMut(usize) -> T;
const fn from_fn_boxed_in<F, A>(fill: F, alloc: A) -> Box<Self, A>
where F: FnMut(usize) -> T,
A: Allocator;
const fn rfrom_fn_boxed_in<F, A>(fill: F, alloc: A) -> Box<Self, A>
where F: FnMut(usize) -> T,
A: Allocator;
const fn try_from_fn<F, E>(fill: F) -> Result<Self, E>
where F: FnMut(usize) -> Result<T, E>;
const fn try_rfrom_fn<F, E>(fill: F) -> Result<Self, E>
where F: FnMut(usize) -> Result<T, E>;
const fn try_from_fn_boxed<F, E>(fill: F) -> Result<Box<Self>, E>
where F: FnMut(usize) -> Result<T, E>;
const fn try_rfrom_fn_boxed<F, E>(fill: F) -> Result<Box<Self>, E>
where F: FnMut(usize) -> Result<T, E>;
const fn try_from_fn_boxed_in<F, E, A>(
fill: F,
alloc: A,
) -> Result<Box<Self, A>, E>
where F: FnMut(usize) -> Result<T, E>,
A: Allocator;
const fn try_rfrom_fn_boxed_in<F, E, A>(
fill: F,
alloc: A,
) -> Result<Box<Self, A>, E>
where F: FnMut(usize) -> Result<T, E>,
A: Allocator;
const async fn from_fn_async<F>(fill: F) -> Self
where F: AsyncFn(usize) -> T;
const async fn try_from_fn_async<F, E>(fill: F) -> Result<Self, E>
where F: AsyncFn(usize) -> Result<T, E>;
}
Required Methods§
const fn from_fn<F>(fill: F) -> Self
const fn rfrom_fn<F>(fill: F) -> Self
const fn from_fn_boxed<F>(fill: F) -> Box<Self>
const fn rfrom_fn_boxed<F>(fill: F) -> Box<Self>
const fn from_fn_boxed_in<F, A>(fill: F, alloc: A) -> Box<Self, A>
const fn rfrom_fn_boxed_in<F, A>(fill: F, alloc: A) -> Box<Self, A>
const fn try_from_fn<F, E>(fill: F) -> Result<Self, E>
const fn try_rfrom_fn<F, E>(fill: F) -> Result<Self, E>
const fn try_from_fn_boxed<F, E>(fill: F) -> Result<Box<Self>, E>
const fn try_rfrom_fn_boxed<F, E>(fill: F) -> Result<Box<Self>, E>
const fn try_from_fn_boxed_in<F, E, A>( fill: F, alloc: A, ) -> Result<Box<Self, A>, E>
const fn try_rfrom_fn_boxed_in<F, E, A>( fill: F, alloc: A, ) -> Result<Box<Self, A>, E>
const async fn from_fn_async<F>(fill: F) -> Self
const async fn try_from_fn_async<F, E>(fill: F) -> Result<Self, E>
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.