[][src]Trait hirpdag_hashconsing::ReferenceWeak

pub trait ReferenceWeak<D, R> where
    D: Hash + Eq + Debug,
    R: Reference<D>, 
{ pub fn weak_upgrade(ptr: &Self) -> Option<R>;
pub fn weak_downgrade(ptr: &R) -> Self; }

Weak reference handle type.

For HashconsingRef implementations which support both strong and weak refs.

Required methods

pub fn weak_upgrade(ptr: &Self) -> Option<R>[src]

Get a strong reference handle from a weak reference handle.

This may fail (returning None) if there is no strong reference in existance.

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

Get a weak reference handle from a strong reference handle.

Loading content...

Implementors

impl<D> ReferenceWeak<D, Rc<D>> for RefRcWeak<D> where
    D: Hash + Eq + Debug
[src]

impl<D> ReferenceWeak<D, Arc<D>> for RefArcWeak<D> where
    D: Hash + Eq + Debug
[src]

impl<D> ReferenceWeak<D, ManuallyDrop<Box<D, Global>>> for RefLeakWeak<D> where
    D: Hash + Eq + Debug
[src]

Loading content...