pub struct GraphRef<T: Send + Sync> { /* private fields */ }Expand description
A cloneable reference that preserves structure during deep cloning.
- Regular
clone()creates a shallow copy (same underlying data) - When cloned during
deep_clone(), creates structure-preserving deep copy
Implementations§
Source§impl<T: Send + Sync> GraphRef<T>
impl<T: Send + Sync> GraphRef<T>
Sourcepub fn ptr_eq(&self, other: &GraphRef<T>) -> bool
pub fn ptr_eq(&self, other: &GraphRef<T>) -> bool
Check if two refs point to the same data (same graph and index).
Sourcepub fn same_graph(&self, other: &GraphRef<T>) -> bool
pub fn same_graph(&self, other: &GraphRef<T>) -> bool
Check if two refs are in the same graph (may have different indices).
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for GraphRef<T>
impl<T> !RefUnwindSafe for GraphRef<T>
impl<T> Send for GraphRef<T>
impl<T> Sync for GraphRef<T>
impl<T> Unpin for GraphRef<T>
impl<T> UnsafeUnpin for GraphRef<T>
impl<T> !UnwindSafe for GraphRef<T>
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