trait Thin = Pointee<Metadata = ()>;
🔬This is a nightly-only experimental API. (
ptr_metadata
)Expand description
Pointers to types implementing this trait alias are “thin”.
This includes statically-Sized
types and extern
types.
§Example
#![feature(ptr_metadata)]
fn this_never_panics<T: std::ptr::Thin>() {
assert_eq!(size_of::<&T>(), size_of::<usize>())
}