pub struct GraphIndexPrefixAdapter<I: IndexLike> { /* private fields */ }Expand description
An adapter that prefixes/un-prefixes every key passed through to a
wrapped index. Mirrors GraphIndexPrefixAdapter.
Implementations§
Trait Implementations§
Source§impl<I: IndexLike> IndexLike for GraphIndexPrefixAdapter<I>
impl<I: IndexLike> IndexLike for GraphIndexPrefixAdapter<I>
Source§fn node_ref_lists(&self) -> Result<usize, IndexError>
fn node_ref_lists(&self) -> Result<usize, IndexError>
Number of parallel reference lists per node.
Source§fn iter_all(&self) -> Result<Vec<IndexEntry>, IndexError>
fn iter_all(&self) -> Result<Vec<IndexEntry>, IndexError>
Iterate every present entry.
Source§fn iter(&self, keys: &[IndexKey]) -> Result<Vec<IndexEntry>, IndexError>
fn iter(&self, keys: &[IndexKey]) -> Result<Vec<IndexEntry>, IndexError>
Iterate present entries restricted to
keys.Source§fn iter_prefix(
&self,
prefixes: &[KeyPrefix],
) -> Result<Vec<IndexEntry>, IndexError>
fn iter_prefix( &self, prefixes: &[KeyPrefix], ) -> Result<Vec<IndexEntry>, IndexError>
Iterate present entries whose keys match one of
prefixes.Source§fn external_refs(
&self,
_ref_list_num: usize,
) -> Result<HashSet<IndexKey>, IndexError>
fn external_refs( &self, _ref_list_num: usize, ) -> Result<HashSet<IndexKey>, IndexError>
Set of reference keys at
ref_list_num not present in the
index.Source§fn clear_cache(&self)
fn clear_cache(&self)
Optional cache-clear hook. Default no-op.
Source§fn find_ancestors(
&self,
search_keys: &[IndexKey],
ref_list_num: usize,
parent_map: &mut HashMap<IndexKey, Vec<IndexKey>>,
missing_keys: &mut HashSet<IndexKey>,
) -> Result<HashSet<IndexKey>, IndexError>
fn find_ancestors( &self, search_keys: &[IndexKey], ref_list_num: usize, parent_map: &mut HashMap<IndexKey, Vec<IndexKey>>, missing_keys: &mut HashSet<IndexKey>, ) -> Result<HashSet<IndexKey>, IndexError>
One step of the ancestry walk used by
CombinedGraphIndex::find_ancestry. Looks up each key in the
index, populating parent_map[key] = parent_keys for each
found entry and adding the unfound keys to missing_keys.
Returns the parent keys that aren’t already in parent_map,
ready to feed into the next iteration.Auto Trait Implementations§
impl<I> Freeze for GraphIndexPrefixAdapter<I>where
I: Freeze,
impl<I> RefUnwindSafe for GraphIndexPrefixAdapter<I>where
I: RefUnwindSafe,
impl<I> Send for GraphIndexPrefixAdapter<I>where
I: Send,
impl<I> Sync for GraphIndexPrefixAdapter<I>where
I: Sync,
impl<I> Unpin for GraphIndexPrefixAdapter<I>where
I: Unpin,
impl<I> UnsafeUnpin for GraphIndexPrefixAdapter<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for GraphIndexPrefixAdapter<I>where
I: UnwindSafe,
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