use sealed::sealed; #[sealed] pub trait FromArray { fn from(arr: [T; N]) -> Self; } #[sealed] impl FromArray for Vec { fn from(arr: [T; N]) -> Self { let mut v = Vec::with_capacity(N); for i in 0..N { v[i] = arr[i]; } v } } fn main() {}