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]
impl<'a, T: Debug + 'a> Debug for PtrKey<'a, T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, T> Clone for PtrKey<'a, T>[src]
impl<'a, T> Clone for PtrKey<'a, T>fn clone(&self) -> Self[src]
fn clone(&self) -> SelfReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<'a, T> Copy for PtrKey<'a, T>[src]
impl<'a, T> Copy for PtrKey<'a, T>impl<'a, T> PartialEq for PtrKey<'a, T>[src]
impl<'a, T> PartialEq for PtrKey<'a, T>fn eq(&self, rhs: &Self) -> bool[src]
fn eq(&self, rhs: &Self) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl<'a, T> Eq for PtrKey<'a, T>[src]
impl<'a, T> Eq for PtrKey<'a, T>impl<'a, T> Hash for PtrKey<'a, T>[src]
impl<'a, T> Hash for PtrKey<'a, T>fn hash<H: Hasher>(&self, hasher: &mut H)[src]
fn hash<H: Hasher>(&self, hasher: &mut H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl<'a, T> Deref for PtrKey<'a, T>[src]
impl<'a, T> Deref for PtrKey<'a, T>