Recyclable

Trait Recyclable 

Source
unsafe trait Recyclable<From: Sized>: Sized { }
Expand description

Denotes that an allocation of From can be recycled into an allocation of Self.

§Safety

Self is Recyclable<From> if Layout::new::<Self>() == Layout::new::<From>().

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<From, To> Recyclable<From> for To
where for<'a> &'a MaybeUninit<To>: TransmuteFrom<&'a MaybeUninit<From>, { Assume::SAFETY }>, for<'a> &'a MaybeUninit<From>: TransmuteFrom<&'a MaybeUninit<To>, { Assume::SAFETY }>,