Module uninit::extension_traits
source · Expand description
Extension traits to enhance external types with useful methods.
Traits
- Extension trait to convert a
&mut _
into a&out _
by calling.as_out()
on it. - BoxAssumeInit
alloc
orstd
Extension trait to.assume_init()
through aBox
. - BoxNewUninitSlice
alloc
orstd
- BoxUninit
alloc
orstd
Extension trait for uninitalizedBox
allocations and the optimized delayed-initialization pattern. - Extension trait providing a cast to the
ManuallyDrop
type. - Extension trait providing tranformations between init and uninit.
- Extension trait to transform between
[MaybeUninit<T>; N]
andMaybeUninit<[T; N]>
, as well as between references to each. - VecCapacity
alloc
orstd
Extension trait forVec
, allowing a non-unsafe
API to interact with the backing buffer / allocation. - VecExtendFromReader(
alloc
orstd
) andstd
Extension trait forVec
, that grows the vec by a bounded amount of bytes, obtained when reading fromR
.