pub struct ModuleSymbols { /* private fields */ }Expand description
Symbols declared by a single DAG/module.
Implementations§
Source§impl ModuleSymbols
impl ModuleSymbols
Sourcepub fn from_declarations(
owner: DagId,
declarations: &[Declaration],
) -> Result<Self, ModuleResolveError>
pub fn from_declarations( owner: DagId, declarations: &[Declaration], ) -> Result<Self, ModuleResolveError>
Build a module symbol table from a declaration list.
The owner is the canonical DAG/module identity assigned by the loader.
The declarations are not modified; this is a pure collection pass.
§Errors
Returns ModuleResolveError::DuplicateSymbol when two definitions in
the same namespace share a leaf name.
Sourcepub const fn decls(&self) -> &HashMap<DeclName, ModuleDeclSymbol>
pub const fn decls(&self) -> &HashMap<DeclName, ModuleDeclSymbol>
Value/declaration namespace symbols.
Sourcepub const fn dimensions(&self) -> &HashMap<DimName, ModuleSymbol<Dim>>
pub const fn dimensions(&self) -> &HashMap<DimName, ModuleSymbol<Dim>>
Dimension namespace symbols.
Sourcepub const fn struct_types(
&self,
) -> &HashMap<StructTypeName, ModuleSymbol<StructType>>
pub const fn struct_types( &self, ) -> &HashMap<StructTypeName, ModuleSymbol<StructType>>
Struct/tagged-union type namespace symbols.
Sourcepub const fn indexes(&self) -> &HashMap<IndexName, ModuleIndexSymbol>
pub const fn indexes(&self) -> &HashMap<IndexName, ModuleIndexSymbol>
Index namespace symbols.
Sourcepub const fn constructors(
&self,
) -> &HashMap<ConstructorName, ModuleSymbol<Constructor>>
pub const fn constructors( &self, ) -> &HashMap<ConstructorName, ModuleSymbol<Constructor>>
Tagged-union constructor namespace symbols.
Trait Implementations§
Source§impl Clone for ModuleSymbols
impl Clone for ModuleSymbols
Source§fn clone(&self) -> ModuleSymbols
fn clone(&self) -> ModuleSymbols
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 ModuleSymbols
impl Debug for ModuleSymbols
impl Eq for ModuleSymbols
Source§impl PartialEq for ModuleSymbols
impl PartialEq for ModuleSymbols
Source§fn eq(&self, other: &ModuleSymbols) -> bool
fn eq(&self, other: &ModuleSymbols) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ModuleSymbols
Auto Trait Implementations§
impl Freeze for ModuleSymbols
impl RefUnwindSafe for ModuleSymbols
impl Send for ModuleSymbols
impl Sync for ModuleSymbols
impl Unpin for ModuleSymbols
impl UnsafeUnpin for ModuleSymbols
impl UnwindSafe for ModuleSymbols
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.