pub struct RefAdjacency { /* private fields */ }Expand description
Bidirectional ref-edge tracking.
Maintains forward edges (entity -> targets) and reverse edges (target -> sources) for efficient traversal in both directions.
Implementations§
Source§impl RefAdjacency
impl RefAdjacency
Sourcepub fn add(&mut self, entity_id: usize, ref_tag: &str, target_ref_val: &str)
pub fn add(&mut self, entity_id: usize, ref_tag: &str, target_ref_val: &str)
Record a ref edge from entity_id via ref_tag to target_ref_val.
Sourcepub fn remove(&mut self, entity_id: usize)
pub fn remove(&mut self, entity_id: usize)
Remove all edges originating from entity_id.
Cleans up both forward and reverse indices.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RefAdjacency
impl RefUnwindSafe for RefAdjacency
impl Send for RefAdjacency
impl Sync for RefAdjacency
impl Unpin for RefAdjacency
impl UnsafeUnpin for RefAdjacency
impl UnwindSafe for RefAdjacency
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