pub trait ArrayElem<'a>: 'a + Sealed {
type Target;
// Required method
unsafe fn from_nonnull(ptr: NonNull<Self::Target>) -> Self;
}Expand description
Types that can be stored in a RegArray.
⚠️ This trait is sealed and cannot be implemented for types outside of this crate.
Required Associated Types§
Required Methods§
sourceunsafe fn from_nonnull(ptr: NonNull<Self::Target>) -> Self
unsafe fn from_nonnull(ptr: NonNull<Self::Target>) -> Self
Creates a new pointer to Self::Target.
§Safety
ptrmust point to a valid instance ofSelf::Target;ptrmust be valid for the whole lifetime'a.
Object Safety§
This trait is not object safe.