pub struct TypeRegistry { /* private fields */ }Implementations§
Source§impl TypeRegistry
impl TypeRegistry
pub fn new() -> Self
Sourcepub fn is_generic(&self, name: Symbol) -> bool
pub fn is_generic(&self, name: Symbol) -> bool
Check if a symbol is a generic type (takes parameters)
Sourcepub fn get_generics(&self, name: Symbol) -> Option<&[Symbol]>
pub fn get_generics(&self, name: Symbol) -> Option<&[Symbol]>
Phase 34: Get type parameters for a user-defined generic type
Sourcepub fn iter_types(&self) -> impl Iterator<Item = (&Symbol, &TypeDef)>
pub fn iter_types(&self) -> impl Iterator<Item = (&Symbol, &TypeDef)>
Iterate over all registered types (for codegen)
Sourcepub fn find_variant(
&self,
variant_name: Symbol,
) -> Option<(Symbol, &VariantDef)>
pub fn find_variant( &self, variant_name: Symbol, ) -> Option<(Symbol, &VariantDef)>
Phase 33: Check if a symbol is a known enum variant Returns Some((enum_name, variant_def)) if found
Sourcepub fn is_variant(&self, name: Symbol) -> bool
pub fn is_variant(&self, name: Symbol) -> bool
Phase 33: Check if a symbol is an enum variant
Sourcepub fn with_primitives(interner: &mut Interner) -> Self
pub fn with_primitives(interner: &mut Interner) -> Self
Pre-register primitives and intrinsic generics
Trait Implementations§
Source§impl Clone for TypeRegistry
impl Clone for TypeRegistry
Source§fn clone(&self) -> TypeRegistry
fn clone(&self) -> TypeRegistry
Returns a duplicate of the value. Read more
1.0.0 · 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 TypeRegistry
impl Debug for TypeRegistry
Source§impl Default for TypeRegistry
impl Default for TypeRegistry
Source§fn default() -> TypeRegistry
fn default() -> TypeRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeRegistry
impl RefUnwindSafe for TypeRegistry
impl Send for TypeRegistry
impl Sync for TypeRegistry
impl Unpin for TypeRegistry
impl UnwindSafe for TypeRegistry
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