std::intrinsics

Function size_of_val

source
pub const unsafe fn size_of_val<T>(_ptr: *const T) -> usize
where T: ?Sized,
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

The size of the referenced value in bytes.

The stabilized version of this intrinsic is crate::mem::size_of_val.

§Safety

See crate::mem::size_of_val_raw for safety conditions.