[][src]Trait uninit::extension_traits::BoxAssumeInit

pub trait BoxAssumeInit: Sealed {
    type Ret: ?Sized;
    unsafe fn assume_init(this: Self) -> Box<Self::Ret>;
}
This is supported on crate features alloc or std only.

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)]

Associated Types

type Ret: ?Sized

This is supported on crate features alloc or std only.
Loading content...

Required methods

unsafe fn assume_init(this: Self) -> Box<Self::Ret>

This is supported on crate features alloc or std only.
Loading content...

Implementations on Foreign Types

impl<T> BoxAssumeInit for Box<[MaybeUninit<T>]>[src]

type Ret = [T]

This is supported on crate features alloc or std only.

unsafe fn assume_init(this: Box<[MaybeUninit<T>]>) -> Box<[T]>[src]

This is supported on crate features alloc or std only.

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

Safety

impl<T> BoxAssumeInit for Box<MaybeUninit<T>>[src]

type Ret = T

This is supported on crate features alloc or std only.

unsafe fn assume_init(this: Box<MaybeUninit<T>>) -> Box<T>[src]

This is supported on crate features alloc or std only.

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

Safety

Loading content...

Implementors

Loading content...