Trait bytemuck::allocation::TransparentWrapperAlloc
source · pub trait TransparentWrapperAlloc<Inner: ?Sized>: TransparentWrapper<Inner> {
// Provided methods
fn wrap_vec(s: Vec<Inner>) -> Vec<Self>
where Self: Sized,
Inner: Sized { ... }
fn wrap_box(s: Box<Inner>) -> Box<Self> { ... }
fn peel_vec(s: Vec<Self>) -> Vec<Inner>
where Self: Sized,
Inner: Sized { ... }
fn peel_box(s: Box<Self>) -> Box<Inner> { ... }
}
Expand description
An extension trait for TransparentWrapper
and alloc types.
Provided Methods§
sourcefn wrap_vec(s: Vec<Inner>) -> Vec<Self>where
Self: Sized,
Inner: Sized,
fn wrap_vec(s: Vec<Inner>) -> Vec<Self>where Self: Sized, Inner: Sized,
Convert a vec of the inner type into a vec of the wrapper type.
sourcefn wrap_box(s: Box<Inner>) -> Box<Self>
fn wrap_box(s: Box<Inner>) -> Box<Self>
Convert a box to the inner type into a box to the wrapper type.