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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".