[][src]Trait hirpdag_hashconsing::Reference

pub trait Reference<D> where
    D: Hash + Eq + Debug
{ pub fn new(data: D) -> Self;
pub fn strong_deref(ptr: &Self) -> &D;
pub fn strong_clone(ptr: &Self) -> Self;
pub fn strong_ptr_eq(a: &Self, b: &Self) -> bool; }

Strong reference handle type.

Required methods

pub fn new(data: D) -> Self[src]

Move the data into a new strong reference.

pub fn strong_deref(ptr: &Self) -> &D[src]

Borrow the referenced data.

pub fn strong_clone(ptr: &Self) -> Self[src]

Clone the reference handle. The new resulting handle will refer to the same data.

pub fn strong_ptr_eq(a: &Self, b: &Self) -> bool[src]

Check if two reference handles refer to the same data.

Loading content...

Implementors

impl<D> Reference<D> for RefArc<D> where
    D: Hash + Eq + Debug
[src]

impl<D> Reference<D> for RefLeak<D> where
    D: Hash + Eq + Debug
[src]

impl<D> Reference<D> for RefRc<D> where
    D: Hash + Eq + Debug
[src]

Loading content...