Struct rustc_data_structures::ptr_key::PtrKey[][src]

pub struct PtrKey<'a, T: 'a>(pub &'a T);

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.

Trait Implementations

impl<'a, T: Debug + 'a> Debug for PtrKey<'a, T>
[src]

Formats the value using the given formatter. Read more

impl<'a, T> Clone for PtrKey<'a, T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T> Copy for PtrKey<'a, T>
[src]

impl<'a, T> PartialEq for PtrKey<'a, T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a, T> Eq for PtrKey<'a, T>
[src]

impl<'a, T> Hash for PtrKey<'a, T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a, T> Deref for PtrKey<'a, T>
[src]

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

impl<'a, T> Send for PtrKey<'a, T> where
    T: Sync

impl<'a, T> Sync for PtrKey<'a, T> where
    T: Sync