Skip to main content

UnitMatchIndex

Struct UnitMatchIndex 

Source
pub struct UnitMatchIndex { /* private fields */ }
Expand description

Precomputed lookup index for workspace unit matching and file-scoped definition positions.

Implementations§

Source§

impl UnitMatchIndex

Source

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.

Source

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.

Source

pub fn assoc_ty_defs<B: AsRef<[u8]>>( &self, reader_idx: usize, reader: &IndexReader<B>, ) -> &[u32]

Source

pub fn is_valid_for_readers<B: AsRef<[u8]>>( &self, readers: &[IndexReader<B>], ) -> bool

Source

pub fn reader_has_special(&self, reader_idx: usize) -> bool

Source

pub fn readers_for_clean_file(&self, file_path: &str) -> Option<&[(usize, u32)]>

Source

pub fn find_file_id_fast<B: AsRef<[u8]>>( &self, reader_idx: usize, reader: &IndexReader<B>, file_path: &str, ) -> Option<Option<u32>>

Source

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

Source

pub fn crate_versions_count(&self, crate_name: &str) -> usize

Source

pub fn is_unit_in_crate(&self, crate_name: &str, unit_key: &str) -> bool

Source

pub fn is_crate_defined_unit(&self, crate_name: &str, unit_key: &str) -> bool

Source

pub fn readers_for_unit(&self, unit_key: &str) -> Option<&[usize]>

Source

pub fn readers_for_crate(&self, crate_name: &str) -> Option<&[usize]>

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UnitMatchIndex

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UnitMatchIndex

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for UnitMatchIndex

Source§

impl PartialEq for UnitMatchIndex

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UnitMatchIndex

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.