Thin in core::ptr - Rust
Description: Pointers to types implementing this trait alias are “thin”.
Keywords: rust, rustlang, rust-lang, Thin

# Trait Alias core::ptr::Thin
[−][src]

    trait Thin = Pointee<Metadata = ()>;

🔬 This is a nightly-only experimental API. (`ptr_metadata` #81513)

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!(std::mem::size_of::<&T>(), std::mem::size_of::<usize>())
    }

Run