pub struct InverseIndex { /* private fields */ }Expand description
A precomputed index from referenced object to the objects that reference it.
Turns repeated Dataset::referrers scans into hash lookups.
Implementations§
Source§impl InverseIndex
impl InverseIndex
Sourcepub fn build(dataset: &Dataset) -> InverseIndex
pub fn build(dataset: &Dataset) -> InverseIndex
Index every association in the dataset.
Sourcepub fn referrers(&self, attr: AttrId, target: &Mrid) -> &[ObjectId]
pub fn referrers(&self, attr: AttrId, target: &Mrid) -> &[ObjectId]
Objects whose attr points at target.
Trait Implementations§
Auto Trait Implementations§
impl Forget for InverseIndex
impl Freeze for InverseIndex
impl Move for InverseIndex
impl RefUnwindSafe for InverseIndex
impl Send for InverseIndex
impl Sync for InverseIndex
impl Unpin for InverseIndex
impl UnsafeUnpin for InverseIndex
impl UnwindSafe for InverseIndex
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