pub trait CastSlice<'a, T>: Sized {
// Required method
fn cast_slice(selves: &'a [Self]) -> &'a [T];
}
Expand description
A trait for casting slices of different types to and from each other, provided that they have the same memory layout.
Required Methods§
fn cast_slice(selves: &'a [Self]) -> &'a [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.