pub struct RelationshipIndex<'m> { /* private fields */ }Expand description
Reverse-reference index paired with the model snapshot it indexes.
Build this once when querying many entities. It preserves the tolerant
decoding of super::naming while avoiding a relationship rescan per
target. Mutating the borrowed model requires dropping this index first, so
its derived references cannot silently become stale.
Implementations§
Source§impl<'m> RelationshipIndex<'m>
impl<'m> RelationshipIndex<'m>
Sourcepub fn naming(&self, target: EntityId) -> Vec<Relationship>
pub fn naming(&self, target: EntityId) -> Vec<Relationship>
Relationships whose related/member end names target.
Results use the same deterministic kind and entity ordering as
super::all. Malformed or unrelated records that merely reference the
target from the same absolute slot are ignored.
Trait Implementations§
Auto Trait Implementations§
impl<'m> !RefUnwindSafe for RelationshipIndex<'m>
impl<'m> !UnwindSafe for RelationshipIndex<'m>
impl<'m> Freeze for RelationshipIndex<'m>
impl<'m> Send for RelationshipIndex<'m>
impl<'m> Sync for RelationshipIndex<'m>
impl<'m> Unpin for RelationshipIndex<'m>
impl<'m> UnsafeUnpin for RelationshipIndex<'m>
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