Struct rustc_data_structures::ptr_key::PtrKey [−][src]
pub struct PtrKey<'a, T>(pub &'a T);
Expand description
A wrapper around reference that compares and hashes like a pointer.
Can be used as a key in sets/maps indexed by pointers to avoid unsafe
.
Tuple Fields
0: &'a T
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for PtrKey<'a, T> where
T: RefUnwindSafe,
impl<'a, T> UnwindSafe for PtrKey<'a, T> where
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes