pub struct CrossRefIndex { /* private fields */ }Expand description
In-memory index for cross-partition edges
This index is always fully loaded to enable efficient cross-partition queries. Cross-partition edges typically represent <5% of total edges.
Implementations§
Source§impl CrossRefIndex
impl CrossRefIndex
Sourcepub fn add_all(&mut self, cross_refs: impl IntoIterator<Item = CrossRef>)
pub fn add_all(&mut self, cross_refs: impl IntoIterator<Item = CrossRef>)
Add multiple cross-references
Sourcepub fn get_by_target(&self, target_id: &str) -> Option<&Vec<CrossRef>>
pub fn get_by_target(&self, target_id: &str) -> Option<&Vec<CrossRef>>
Get all cross-references targeting a specific node
Sourcepub fn get_by_source(&self, source_id: &str) -> Option<&Vec<CrossRef>>
pub fn get_by_source(&self, source_id: &str) -> Option<&Vec<CrossRef>>
Get all cross-references from a specific source node
Sourcepub fn remove_by_source_partition(&mut self, partition: &str)
pub fn remove_by_source_partition(&mut self, partition: &str)
Remove all cross-references where source is from a specific partition
Sourcepub fn remove_by_partition(&mut self, partition: &str)
pub fn remove_by_partition(&mut self, partition: &str)
Remove all cross-references involving a specific partition (source or target)
Sourcepub fn source_partitions(&self) -> impl Iterator<Item = &str>
pub fn source_partitions(&self) -> impl Iterator<Item = &str>
Get all unique source partitions
Sourcepub fn target_partitions(&self) -> impl Iterator<Item = &str>
pub fn target_partitions(&self) -> impl Iterator<Item = &str>
Get all unique target partitions
Trait Implementations§
Source§impl Debug for CrossRefIndex
impl Debug for CrossRefIndex
Source§impl Default for CrossRefIndex
impl Default for CrossRefIndex
Source§fn default() -> CrossRefIndex
fn default() -> CrossRefIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CrossRefIndex
impl RefUnwindSafe for CrossRefIndex
impl Send for CrossRefIndex
impl Sync for CrossRefIndex
impl Unpin for CrossRefIndex
impl UnwindSafe for CrossRefIndex
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more