pub trait BoxAssumeInit: Sealed {
    type Ret: ?Sized;

    unsafe fn assume_init(self) -> Box<Self::Ret>;
}
Available on crate features alloc or std only.
Expand description

Extension trait to .assume_init() through a Box.

This is a compatibility helper trait. For versions of Rust where the feature(box_uninit) is unstable, this trait enables the feature in stable Rust. This may trigger an unstable_name_collisions lint, but this is fine, since the implementation is the same. You can dismiss that lint with:

#![allow(unstable_name_collisions)]

Required Associated Types

Required Methods

Implementations on Foreign Types

Allows to “.assume_init()” a boxed [MaybeUninit<T>].

Safety

Allows to “.assume_init()” a boxed MaybeUninit<T>.

Safety

Implementors