Function core::const: unstable · source ·
pub fn from_raw_parts<T: ?Sized>( data_address: *const (), metadata: <T as Pointee>::Metadata ) -> *const T
🔬This is a nightly-only experimental API. (
Forms a (possibly-wide) raw pointer from a data address and metadata.
This function is safe but the returned pointer is not necessarily safe to dereference.
For slices, see the documentation of
slice::from_raw_parts for safety requirements.
For trait objects, the metadata must come from a pointer to the same underlying erased type.