[][src]Trait refpool::PoolDefault

pub trait PoolDefault: Default {
    unsafe fn default_uninit(target: &mut MaybeUninit<Self>);

A trait for initialising a MaybeUninit<Self> to a default value.

Required methods

unsafe fn default_uninit(target: &mut MaybeUninit<Self>)

Initialise an instance of Self to its default state.

Specifically, after calling self.default_uninit(), the object's state should be equal to what <Self as Default>::default() would produce.


You should assume that the object as passed to you contains uninitialised memory, and you must leave it in a fully initialised state, as expected by MaybeUninit::assume_init().

Loading content...


impl<A> PoolDefault for A where
    A: PoolDefaultImpl

Loading content...