pub struct ModuleTypeRegistry { /* private fields */ }Implementations§
Source§impl ModuleTypeRegistry
impl ModuleTypeRegistry
Sourcepub fn insert_graphcal_prelude(&mut self) -> Result<(), RationalError>
pub fn insert_graphcal_prelude(&mut self) -> Result<(), RationalError>
Insert canonical Graphcal prelude dimensions under the synthetic prelude owner.
§Errors
Returns a rational arithmetic error only if the built-in prelude itself fails to construct, which would be a compiler bug.
Sourcepub fn insert_registry(&mut self, owner: &DagId, registry: &Registry)
pub fn insert_registry(&mut self, owner: &DagId, registry: &Registry)
Insert every type-system definition from registry under owner.
This is intentionally an owner-qualified view over existing registries,
not a new source of truth. It lets module-aware resolution validate that
alias.Name denotes the definition owned by the dependency selected by
the loader.
pub fn get_dimension(&self, name: &ResolvedName<Dim>) -> Option<&Dimension>
pub fn get_index(&self, name: &ResolvedName<Index>) -> Option<&IndexDef>
pub fn get_struct_type( &self, name: &ResolvedName<StructType>, ) -> Option<&TypeDef>
Sourcepub fn lookup_constructor(
&self,
constructor: &ResolvedName<Constructor>,
) -> Option<&ModuleConstructorDef>
pub fn lookup_constructor( &self, constructor: &ResolvedName<Constructor>, ) -> Option<&ModuleConstructorDef>
Look up the owner type and union member for a canonical constructor identity.
Trait Implementations§
Source§impl Clone for ModuleTypeRegistry
impl Clone for ModuleTypeRegistry
Source§fn clone(&self) -> ModuleTypeRegistry
fn clone(&self) -> ModuleTypeRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleTypeRegistry
impl Debug for ModuleTypeRegistry
Source§impl Default for ModuleTypeRegistry
impl Default for ModuleTypeRegistry
Source§fn default() -> ModuleTypeRegistry
fn default() -> ModuleTypeRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleTypeRegistry
impl RefUnwindSafe for ModuleTypeRegistry
impl Send for ModuleTypeRegistry
impl Sync for ModuleTypeRegistry
impl Unpin for ModuleTypeRegistry
impl UnsafeUnpin for ModuleTypeRegistry
impl UnwindSafe for ModuleTypeRegistry
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