pub struct Instances { /* private fields */ }Expand description
The const stage’s map from canonical name to instantiated module: what makes one name yield one instance.
A caller passes one in and may keep it: within a single load_module it
deduplicates the import graph (a diamond shares its instance), and across
calls it becomes a host’s module cache, so a module loaded once is not
compiled again. Reuse is safe because a name fixes a frame — one name has one
set of imports, instantiated leaves-first, so name equality implies frame
equality. The cost of keeping it is that a cached name is never recompiled:
changed source on disk is not noticed until the entry is dropped.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Instances
impl !RefUnwindSafe for Instances
impl !Send for Instances
impl !Sync for Instances
impl Unpin for Instances
impl UnsafeUnpin for Instances
impl !UnwindSafe for Instances
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