pub trait PoolDefaultImpl: Default { }Expand description
A marker trait for types which should be fully initialised.
Implementing this trait for a type provides a PoolDefault
implementation which writes the result of
Default::default() to its memory location.
For types which implement Clone, this will also provide an
implementation of PoolClone that writes the result of
Clone::clone() to its memory location.
This makes sense for most types, and these implementations are always
correct, but you may wish to provide your own implementations for types
which don’t have to fully initialise their allocated memory regions, which
is why we don’t implement PoolDefault for anything that
implements Default and PoolClone for anything
that implements Clone, given the absence of trait
specialisation.
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.