Trait slice_of_array::IsSliceomorphic
[−]
[src]
pub unsafe trait IsSliceomorphic: Sized { type Element; fn array_len() -> usize; }
Marker trait used in bounds of Slice{Flat,Nest,Array}Ext.
This marks the array types approved for use with slice_of_array.
It is deliberately not implemented for arrays of size 0,
because said traits are otherwise perfect isomorphisms for
the inputs that they don't fail on;
Having .flat().nest() turn a &[[i32; 0]] of length 18
into a &[[i32; 0]] of length 0 gives me the heebie jeebies.
Unsafe because unsafe code relies on a number of properties of arrays for any type that implements this trait.