Trait CastSliceMut

Source
pub trait CastSliceMut<'a, T>: CastSlice<'a, T> {
    // Required method
    fn cast_slice_mut(selves: &'a mut [Self]) -> &'a mut [T];
}
Expand description

A trait for casting slices of different types to and from each other, mutably, provided that they have the same memory layout.

Any modifications to the target type must not be able to violate invariants of the source type.

Required Methods§

Source

fn cast_slice_mut(selves: &'a mut [Self]) -> &'a mut [T]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> CastSliceMut<'_, T> for T