Skip to main content

BuildArray

Trait BuildArray 

Source
pub unsafe trait BuildArray<C, F> {
    // Required method
    unsafe fn build_into(
        space: *mut Self,
        build_component: &mut impl FnMut(*mut C),
    );
}
Expand description

All useful implementations of this trait are already provided by this crate.

Indicates that the implementing type is an array that can be initialised with a closure.

The F generic type parameter is used to convince Rust to allow this - it is normally (always?) inferred by the compiler.

Required Methods§

Source

unsafe fn build_into(space: *mut Self, build_component: &mut impl FnMut(*mut C))

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, Q, F, const N: usize> BuildArray<T, (F,)> for [Q; N]
where Q: BuildArray<T, F>,

Source§

unsafe fn build_into(space: *mut Self, build_component: &mut impl FnMut(*mut T))

Source§

impl<T, const N: usize> BuildArray<T, ()> for [T; N]

Source§

unsafe fn build_into(space: *mut Self, build_component: &mut impl FnMut(*mut T))

Implementors§