Skip to main content

cast_slice_mut

Function cast_slice_mut 

Source
unsafe fn cast_slice_mut<T, U>(slice: &mut [T]) -> &mut [U]
Expand description

Performs an unsafe pointer cast from one mutable slice type to the other.

ยงCompile-time panics

  • If T and U differ in size
  • If T and U differ in alignment