pub fn new<F>(label: L, len: usize, mut func: F) -> Self
    where
        F: FnMut(&mut L, usize) -> E,
    {
        let array = unsafe { Self::new_lazy(label, len) };
        for i in 0..len {
            unsafe {
                ptr::write(array.data.elem_ptr(i), func(&mut *array.data.lbl_ptr(), i));
            }
        }
        array
    }
/// Creates a new array of size `len`.
///
/// Initializes all elements using the given function, and initializes the
/// label with the provided value.
Creates a new array of size `len`.
Initializes all elements using the given function, and initializes the
label with the provided value.
Creates a new array of size ` len ` . Initializes all elements using the given function and initializes the label with the provided value .
pub fn new<F>(label: L, len: usize, mut func: F) -> Self
    where
        F: FnMut(&mut L, usize) -> E,
    {
        let array = unsafe { Self::new_lazy(label, len) };
        for i in 0..len {
            unsafe {
                ptr::write(array.data.elem_ptr(i), func(&mut *array.data.lbl_ptr(), i));
            }
        }
        array
    }
pub fn new < F > ( label : L , len : usize , mut func : F ) -> Self where F : FnMut ( & mut L , usize ) -> E , { let array = unsafe { Self :: new_lazy ( label , len ) } ; for i in 0 .. len { unsafe { ptr :: write ( array . data . elem_ptr ( i ) , func ( & mut * array . data . lbl_ptr ( ) , i ) ) ; } } array }
Creates a new array of size `len`.
Creates a new array of size ` len ` .
label
L
len
usize
func
F