Skip to main content

RenameWorkspaceCache

Struct RenameWorkspaceCache 

Source
pub struct RenameWorkspaceCache {
Show 15 fields pub cargo_targets: CargoWorkspaceTargets, pub assoc_refs_by_name: HashMap<String, Vec<(u32, u32)>>, pub trait_ref_files_by_short: HashMap<String, Vec<(u32, u32)>>, pub dual_bound_short_names: HashSet<String>, pub ws_trait_short_names: HashSet<String>, pub type_def_crates_by_name: HashMap<String, HashSet<String>>, pub proc_macro_coupled_methods: HashMap<String, String>, pub proc_macro_files: Vec<ProcMacroSourceFile>, pub macro_blocks_by_crate: HashMap<String, Vec<(usize, ParsedMacroBlock)>>, pub file_self_method_owners: HashMap<(String, String), usize>, pub mod_self_method_owners: HashMap<(String, String), usize>, pub self_methods_by_name: HashMap<String, Vec<(String, String, bool)>>, pub factory_fns_by_return_short: HashMap<String, Vec<FactoryFnCandidate>>, pub unindexed_targets: Vec<ParsedUnindexedTarget>, pub unindexed_ident_map: HashMap<String, Vec<usize>>,
}
Expand description

Cached workspace-wide structures shared by prepareRename and rename.

Fields§

§cargo_targets: CargoWorkspaceTargets§assoc_refs_by_name: HashMap<String, Vec<(u32, u32)>>

Short associated item name -> (reader_idx, ref_idx) across workspace shards.

§trait_ref_files_by_short: HashMap<String, Vec<(u32, u32)>>

Uppercase-starting short path segment -> deduplicated (reader_idx, file_id) pairs referencing it.

§dual_bound_short_names: HashSet<String>

Short identifier names that participate in at least one dual-bound macro call-site token (M2).

§ws_trait_short_names: HashSet<String>

Short names of all Trait definitions across workspace shards.

§type_def_crates_by_name: HashMap<String, HashSet<String>>

Type/trait short name -> workspace crate names defining a non-reexport type/trait of that name.

§proc_macro_coupled_methods: HashMap<String, String>

Inherent method names coupled to string literals + .#ident synthesis in workspace proc-macro crates.

§proc_macro_files: Vec<ProcMacroSourceFile>

Pre-loaded workspace proc-macro source files.

§macro_blocks_by_crate: HashMap<String, Vec<(usize, ParsedMacroBlock)>>

Crate name -> (reader_idx, ParsedMacroBlock) for indexed macro_rules! files.

§file_self_method_owners: HashMap<(String, String), usize>

(file, method_name) -> count of distinct root owners with fn method(...self...) in file.

§mod_self_method_owners: HashMap<(String, String), usize>

(module_path_suffix, method_name) -> count of distinct root owners in that module.

§self_methods_by_name: HashMap<String, Vec<(String, String, bool)>>

Method name -> (crate_name, owner_short, is_trait) for workspace AssocFn items with a self receiver.

§factory_fns_by_return_short: HashMap<String, Vec<FactoryFnCandidate>>

Nominal return type short name -> workspace functions/methods whose return type mentions it.

§unindexed_targets: Vec<ParsedUnindexedTarget>

Pre-parsed unindexed Cargo target files (bin/example/test/bench/custom-build).

§unindexed_ident_map: HashMap<String, Vec<usize>>

Identifier token -> indices into unindexed_targets.

Implementations§

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> 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, 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.