pub struct UnitMatchIndex { /* private fields */ }Expand description
Precomputed lookup index for workspace unit matching and file-scoped definition positions.
Implementations§
Source§impl UnitMatchIndex
impl UnitMatchIndex
Sourcepub fn build<B: AsRef<[u8]>>(
readers: &[IndexReader<B>],
unit_keys: &[Option<String>],
reader_extern_units: &[HashMap<String, String>],
) -> Self
pub fn build<B: AsRef<[u8]>>( readers: &[IndexReader<B>], unit_keys: &[Option<String>], reader_extern_units: &[HashMap<String, String>], ) -> Self
Builds a precomputed UnitMatchIndex from the workspace readers and metadata.
Sourcepub fn build_with_deps<B: AsRef<[u8]>>(
readers: &[IndexReader<B>],
unit_keys: &[Option<String>],
reader_extern_units: &[HashMap<String, String>],
_reader_dependencies: &[Vec<String>],
) -> Self
pub fn build_with_deps<B: AsRef<[u8]>>( readers: &[IndexReader<B>], unit_keys: &[Option<String>], reader_extern_units: &[HashMap<String, String>], _reader_dependencies: &[Vec<String>], ) -> Self
Builds a precomputed UnitMatchIndex with lazy 6-hop dependency reachability bitsets.
pub fn assoc_ty_defs<B: AsRef<[u8]>>( &self, reader_idx: usize, reader: &IndexReader<B>, ) -> &[u32]
pub fn is_valid_for_readers<B: AsRef<[u8]>>( &self, readers: &[IndexReader<B>], ) -> bool
pub fn reader_has_special(&self, reader_idx: usize) -> bool
pub fn readers_for_clean_file(&self, file_path: &str) -> Option<&[(usize, u32)]>
pub fn find_file_id_fast<B: AsRef<[u8]>>( &self, reader_idx: usize, reader: &IndexReader<B>, file_path: &str, ) -> Option<Option<u32>>
pub fn matches_unit( &self, reader_idx: usize, ref_target_unit: &str, target_unit: &str, target_crate: &str, reader_extern_units: &[HashMap<String, String>], ) -> bool
pub fn crate_versions_count(&self, crate_name: &str) -> usize
pub fn is_unit_in_crate(&self, crate_name: &str, unit_key: &str) -> bool
pub fn is_crate_defined_unit(&self, crate_name: &str, unit_key: &str) -> bool
pub fn readers_for_unit(&self, unit_key: &str) -> Option<&[usize]>
pub fn readers_for_crate(&self, crate_name: &str) -> Option<&[usize]>
pub fn defs_in_file_up_to( &self, reader_idx: usize, file_id: u32, max_line: u32, ) -> &[(u32, u32, u32)]
Trait Implementations§
Source§impl Clone for UnitMatchIndex
impl Clone for UnitMatchIndex
Source§impl Debug for UnitMatchIndex
impl Debug for UnitMatchIndex
Source§impl Default for UnitMatchIndex
impl Default for UnitMatchIndex
impl Eq for UnitMatchIndex
Source§impl PartialEq for UnitMatchIndex
impl PartialEq for UnitMatchIndex
impl StructuralPartialEq for UnitMatchIndex
Auto Trait Implementations§
impl Forget for UnitMatchIndex
impl Freeze for UnitMatchIndexwhere
*const u8 is !null: Freeze,
PhantomData<(u32, u32, u64, u32)>: Freeze,
PhantomData<(String, usize)>: Freeze,
PhantomData<((String, String), String)>: Freeze,
PhantomData<(String, HashSet<String>)>: Freeze,
PhantomData<(String, Vec<usize>)>: Freeze,
PhantomData<(String, Vec<(usize, u32)>)>: Freeze,
PhantomData<bool>: Freeze,
PhantomData<Vec<(u32, u32, u32)>>: Freeze,
*const ArcInner<Vec<OnceLock<Vec<u32>>>> is !null: Freeze,
PhantomData<ArcInner<Vec<OnceLock<Vec<u32>>>>>: Freeze,
*const ArcInner<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>> is !null: Freeze,
PhantomData<ArcInner<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>>>: Freeze,
*const ArcInner<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>> is !null: Freeze,
PhantomData<ArcInner<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>>>: Freeze,
PhantomData<Option<String>>: Freeze,
*const ArcInner<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>> is !null: Freeze,
PhantomData<ArcInner<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>>>: Freeze,
impl Move for UnitMatchIndex
impl RefUnwindSafe for UnitMatchIndex
impl Send for UnitMatchIndexwhere
RawVecInner: Send,
RawTable<(String, usize)>: Send,
RawTable<((String, String), String)>: Send,
RawTable<(String, HashSet<String>)>: Send,
RawTable<(String, Vec<usize>)>: Send,
RawTable<(String, Vec<(usize, u32)>)>: Send,
Arc<Vec<OnceLock<Vec<u32>>>>: Send,
Arc<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>>: Send,
Arc<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>>: Send,
Arc<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>>: Send,
impl Sync for UnitMatchIndexwhere
RawVecInner: Sync,
RawTable<(String, usize)>: Sync,
RawTable<((String, String), String)>: Sync,
RawTable<(String, HashSet<String>)>: Sync,
RawTable<(String, Vec<usize>)>: Sync,
RawTable<(String, Vec<(usize, u32)>)>: Sync,
Arc<Vec<OnceLock<Vec<u32>>>>: Sync,
Arc<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>>: Sync,
Arc<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>>: Sync,
Arc<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>>: Sync,
impl Unpin for UnitMatchIndex
impl UnsafeUnpin for UnitMatchIndexwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(u32, u32, u64, u32)>: UnsafeUnpin,
PhantomData<(String, usize)>: UnsafeUnpin,
PhantomData<((String, String), String)>: UnsafeUnpin,
PhantomData<(String, HashSet<String>)>: UnsafeUnpin,
PhantomData<(String, Vec<usize>)>: UnsafeUnpin,
PhantomData<(String, Vec<(usize, u32)>)>: UnsafeUnpin,
PhantomData<bool>: UnsafeUnpin,
PhantomData<Vec<(u32, u32, u32)>>: UnsafeUnpin,
*const ArcInner<Vec<OnceLock<Vec<u32>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<OnceLock<Vec<u32>>>>>: UnsafeUnpin,
*const ArcInner<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>>>: UnsafeUnpin,
*const ArcInner<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>>>: UnsafeUnpin,
PhantomData<Option<String>>: UnsafeUnpin,
*const ArcInner<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>> is !null: UnsafeUnpin,
PhantomData<ArcInner<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>>>: UnsafeUnpin,
impl UnwindSafe for UnitMatchIndexwhere
RawVecInner: UnwindSafe,
HashMap<String, usize>: UnwindSafe,
HashMap<(String, String), String>: UnwindSafe,
HashMap<String, HashSet<String>>: UnwindSafe,
HashMap<String, Vec<usize>>: UnwindSafe,
HashMap<String, Vec<(usize, u32)>>: UnwindSafe,
Arc<Vec<OnceLock<Vec<u32>>>>: UnwindSafe,
Arc<Vec<OnceLock<Vec<(u32, u32, u32, u32)>>>>: UnwindSafe,
Arc<Vec<OnceLock<HashMap<Box<str>, Vec<u32>>>>>: UnwindSafe,
Arc<OnceLock<(Vec<(usize, usize)>, Vec<Vec<u64>>)>>: 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