pub struct NodeRc { /* private fields */ }Expand description
Reference counted pointer to a Node in any Context.
It can be used to keep references to Nodes outside of the lifetime of a GCLock,
but the only way to derefence and inspect the Node is to use a GCLock.
A NodeRc must not outlive its Context: dropping a Context while one
is alive panics (see Context’s Drop). Should that happen anyway, the
handle itself stays safe to drop and to clone — the guard leaks the storage
it points at rather than freeing it — but it can no longer be dereferenced,
since NodeRc::node needs a GCLock on the context it came from.
Implementations§
Trait Implementations§
impl Eq for NodeRc
Auto Trait Implementations§
impl !RefUnwindSafe for NodeRc
impl !Send for NodeRc
impl !Sync for NodeRc
impl !UnwindSafe for NodeRc
impl Freeze for NodeRc
impl Unpin for NodeRc
impl UnsafeUnpin for NodeRc
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