use rand::Fill; pub mod multiple_fields; pub mod single_buffer; pub(self) trait FromArray { fn from_array(array: [T; SIZE], args: Args) -> Self; } pub(self) fn fill(args: Args) -> I where I: FromArray, T: Default + Copy, [T]: Fill { use rand::Rng; let mut buf = [T::default(); SIZE]; rand::thread_rng().fill(&mut buf); I::from_array(buf, args) }