/// Return a new `ValueRef` that points at the same underlying memory as the original.
/// Updates to either will result in both changing.
Return a new `ValueRef` that points at the same underlying memory as the original.
Updates to either will result in both changing.
Return a new ` ValueRef ` that points at the same underlying memory as the original . Updates to either will result in both changing .
pub fn clone_reference(&self, heap: &'v Heap) -> ValueRef<'v> {
        match self.0.get() {
            Some(v) if v.0.get_user_tag() => Self(Cell::new(Some(v))),
            v => {
                let reffed = Value(heap.alloc_complex(ValueRef(Cell::new(v))).0.set_user_tag());
                self.0.set(Some(reffed));
                Self(Cell::new(Some(reffed)))
            }
        }
    }
pub fn clone_reference ( & self , heap : & ' v Heap ) -> ValueRef < ' v > { match self . 0 . get ( ) { Some ( v ) if v . 0 . get_user_tag ( ) => Self ( Cell :: new ( Some ( v ) ) ) , v => { let reffed = Value ( heap . alloc_complex ( ValueRef ( Cell :: new ( v ) ) ) . 0 . set_user_tag ( ) ) ; self . 0 . set ( Some ( reffed ) ) ; Self ( Cell :: new ( Some ( reffed ) ) ) } } }
Return a new `ValueRef` that points at the same underlying memory as the original.
Return a new ` ValueRef ` that points at the same underlying memory as the original .
&self
heap
&'v Heap