pub struct NodePtr(/* private fields */);Expand description
Identity of a traced heap allocation: the Rc’s data pointer.
Never dereferenced by the collector itself except through the typed
handles it holds; opaque participants (sema-vm’s UpvalueCell, test node
types) recover their &T from it inside their own trace/sever fns.
Implementations§
Source§impl NodePtr
impl NodePtr
Sourcepub fn of_rc<T: ?Sized>(rc: &Rc<T>) -> NodePtr
pub fn of_rc<T: ?Sized>(rc: &Rc<T>) -> NodePtr
Node identity of any Rc allocation (works for Rc<dyn Any> too).
Sourcepub fn of_value(v: &Value) -> Option<NodePtr>
pub fn of_value(v: &Value) -> Option<NodePtr>
Node identity of a cycle-capable heap value. None for immediates and
leaf heap types (strings, bytevectors, numeric arrays, big ints,
prompts, messages, conversations, streams, bignums, rationals,
complex) — leaves cannot sit on a cycle and are never given nodes.
Sourcepub fn of_env_bindings(env: &Env) -> NodePtr
pub fn of_env_bindings(env: &Env) -> NodePtr
Node identity of an env: its shared bindings allocation. This is the
pointer to pass in collect’s pin set for session root envs.
Trait Implementations§
impl Copy for NodePtr
impl Eq for NodePtr
impl StructuralPartialEq for NodePtr
Auto Trait Implementations§
impl !Send for NodePtr
impl !Sync for NodePtr
impl Freeze for NodePtr
impl RefUnwindSafe for NodePtr
impl Unpin for NodePtr
impl UnsafeUnpin for NodePtr
impl UnwindSafe for NodePtr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.