W3cubDocs

/Rust

Function align_of_val

pub const unsafe fn align_of_val<T>(ptr: *const T) -> usizewhere
    T: ?Sized,
🔬This is a nightly-only experimental API. (core_intrinsics)

The required alignment of the referenced value.

The stabilized version of this intrinsic is core::mem::align_of_val.

Safety

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

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/intrinsics/fn.align_of_val.html