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.
Implementors§
impl<'a, I: InitMarker> CastSlice<'a, IoSlice<'a, I>> for IoBox<I>
Available on crate feature
alloc only.impl<'a, I: InitMarker> CastSlice<'a, IoSliceMut<'a, I>> for IoBox<I>
Available on crate feature
alloc only.