pub struct ModuleRegistry { /* private fields */ }Expand description
Thread-safe registry for modules.
This registry allows concurrent lookups and insertions of imported modules during parallel function analysis. It uses double-checked locking to minimize contention.
Implementations§
Source§impl ModuleRegistry
impl ModuleRegistry
Sourcepub fn get_or_create(
&self,
import_path: String,
file_path: String,
) -> (ModuleId, bool)
pub fn get_or_create( &self, import_path: String, file_path: String, ) -> (ModuleId, bool)
Get or create a module for the given import path and resolved file path.
Returns the ModuleId and whether it was newly created.
Sourcepub fn update_def(&self, id: ModuleId, def: ModuleDef)
pub fn update_def(&self, id: ModuleId, def: ModuleDef)
Update a module definition.
Trait Implementations§
Source§impl Debug for ModuleRegistry
impl Debug for ModuleRegistry
Auto Trait Implementations§
impl !Freeze for ModuleRegistry
impl RefUnwindSafe for ModuleRegistry
impl Send for ModuleRegistry
impl Sync for ModuleRegistry
impl Unpin for ModuleRegistry
impl UnwindSafe for ModuleRegistry
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