pub trait New: Sized {
type Output;
// Required method
unsafe fn new(self, this: Pin<&mut MaybeUninit<Self::Output>>);
}Expand description
Types which can be constructed (initialized) into some provided storage.
Required Associated Types§
Required Methods§
sourceunsafe fn new(self, this: Pin<&mut MaybeUninit<Self::Output>>)
unsafe fn new(self, this: Pin<&mut MaybeUninit<Self::Output>>)
Initialize Self using this for storage.
§Safety
New::new()must not be used to mutate previously initialized datathismust be freshly-allocated memory- after invocation, the
thisplacement argument is in a valid, initialized state
Object Safety§
This trait is not object safe.