Skip to main content

read_shared_ptr

Function read_shared_ptr 

Source
pub unsafe fn read_shared_ptr(cell: *const SharedCell) -> u64
Expand description

Read the raw 8-byte pointer payload of a SharedCell whose interior FieldKind is Ptr. The returned u64 is a ValueWord bit pattern (NaN-boxed Arc/Box pointer) that can be clone_from_bits’d to obtain a retained share.

§Safety

cell must point to a live SharedCell whose interior FieldKind is Ptr.