pub struct ModuleRegistry { /* private fields */ }Expand description
The resolved interfaces of every module in a compilation, keyed by module path. What the type-checker’s module mode (v2.76.0) and the ECC (v2.76.0) consume. Deterministic by construction.
Implementations§
Source§impl ModuleRegistry
impl ModuleRegistry
pub fn new() -> ModuleRegistry
pub fn register(&mut self, path: ModulePath, interface: CognitiveInterface)
pub fn interface(&self, path: &ModulePath) -> Option<&CognitiveInterface>
Sourcepub fn export_kind(&self, path: &ModulePath, name: &str) -> Option<&str>
pub fn export_kind(&self, path: &ModulePath, name: &str) -> Option<&str>
The exported kind of name in module path, if any.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&ModulePath, &CognitiveInterface)>
Trait Implementations§
Source§impl Debug for ModuleRegistry
impl Debug for ModuleRegistry
Source§impl Default for ModuleRegistry
impl Default for ModuleRegistry
Source§fn default() -> ModuleRegistry
fn default() -> ModuleRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleRegistry
impl RefUnwindSafe for ModuleRegistry
impl Send for ModuleRegistry
impl Sync for ModuleRegistry
impl Unpin for ModuleRegistry
impl UnsafeUnpin 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