Ref

Trait Ref 

Source
pub trait Ref: Clone {
    // Required methods
    fn is_same_ref(&self, other: &Self) -> bool;
    fn hash_ref(&self, hasher: &mut impl Hasher);
}

Required Methods§

Source

fn is_same_ref(&self, other: &Self) -> bool

Source

fn hash_ref(&self, hasher: &mut impl Hasher)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> Ref for &T

Source§

fn is_same_ref(&self, other: &Self) -> bool

Source§

fn hash_ref(&self, hasher: &mut impl Hasher)

Source§

impl<T> Ref for Rc<T>

Source§

fn is_same_ref(&self, other: &Self) -> bool

Source§

fn hash_ref(&self, hasher: &mut impl Hasher)

Source§

impl<T> Ref for Arc<T>

Source§

fn is_same_ref(&self, other: &Self) -> bool

Source§

fn hash_ref(&self, hasher: &mut impl Hasher)

Implementors§