[][src]Function sunrise_libutils::cast_mut

pub unsafe fn cast_mut<T, R>(data: &mut [T]) -> &mut [R]

Cast a slice while keeping the lifetimes.

Thanks I hate it.

Safety

data must be aligned for R, even for zero-length slices.

T must be safely castable as R. This generally means that T and R must both be POD types without padding.