#[unsafe(no_mangle)]pub extern "C" fn nstd_core_ptr_new(
obj: NSTDAny,
size: NSTDUInt,
align: NSTDUInt,
) -> NSTDOptionalPtrAvailable on crate feature
core only.Expand description
Creates a new instance of NSTDPtr.
§Parameters:
-
NSTDAny obj- The object to point to. -
NSTDUInt size- The number of bytes thatobj’s type occupies. -
NSTDUInt align- The alignment of the object thatobjpoints to.
§Returns
NSTDOptionalPtr ptr - A new instance of NSTDPtr that points to obj on success, or
an uninitialized “none” variant if obj is null or unaligned or if size is greater than
NSTDInt’s max value.
§Panics
This operation will panic if align is not a power of two.