[][src]Function ari::slice_as_array

pub unsafe fn slice_as_array<T, TArray>(data: &[T]) -> Option<&TArray> where
    TArray: AsRef<[T]>, 

returns a slice as an array, if byte_length(array) == byte_length(slice). this function is unsafe because T may not be a memcopy-safe type.

notes.

we do not require T: Copy because T might be very large and we do not want to force this trait on users.