InitializeExt

Trait InitializeExt 

Source
pub trait InitializeExt:
    Sealed
    + Initialize
    + Sized {
    // Provided method
    unsafe fn assume_init(self) -> AssertInit<Self> { ... }
}

Provided Methods§

Source

unsafe fn assume_init(self) -> AssertInit<Self>

Assume that the type is already initialized. This is equivalent of calling AssertInit::new_unchecked.

§Safety

The initialization invariant must be upheld for this to be safe.

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<T> InitializeExt for T
where T: Initialize,