darkfi_sdk::crypto::constants::util

Function gen_const_array

Source
pub fn gen_const_array<Output: Copy + Default, const LEN: usize>(
    closure: impl FnMut(usize) -> Output,
) -> [Output; LEN]
Expand description

Takes in an FnMut closure and returns a constant-length array with elements of type Output.