pub struct ResolvedTypeReference {
pub target: SymbolId,
pub arguments: Vec<ResolvedTypeReference>,
pub original_name: String,
}Expand description
Resolved type reference with guaranteed validity
Fields§
§target: SymbolIdTarget symbol (guaranteed to exist in symbol table)
arguments: Vec<ResolvedTypeReference>Resolved generic arguments
original_name: StringOriginal type reference for debugging
Implementations§
Source§impl ResolvedTypeReference
impl ResolvedTypeReference
Sourcepub fn new(
target: SymbolId,
arguments: Vec<ResolvedTypeReference>,
original_name: String,
) -> Self
pub fn new( target: SymbolId, arguments: Vec<ResolvedTypeReference>, original_name: String, ) -> Self
Create a new resolved type reference
Sourcepub fn is_primitive(&self, symbol_table: &SymbolTable) -> bool
pub fn is_primitive(&self, symbol_table: &SymbolTable) -> bool
Check if this is a primitive type reference
Sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Check if this is a generic type (has arguments)
Trait Implementations§
Source§impl Clone for ResolvedTypeReference
impl Clone for ResolvedTypeReference
Source§fn clone(&self) -> ResolvedTypeReference
fn clone(&self) -> ResolvedTypeReference
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 ResolvedTypeReference
impl Debug for ResolvedTypeReference
Source§impl PartialEq for ResolvedTypeReference
impl PartialEq for ResolvedTypeReference
Source§fn eq(&self, other: &ResolvedTypeReference) -> bool
fn eq(&self, other: &ResolvedTypeReference) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ResolvedTypeReference
impl StructuralPartialEq for ResolvedTypeReference
Auto Trait Implementations§
impl Freeze for ResolvedTypeReference
impl RefUnwindSafe for ResolvedTypeReference
impl Send for ResolvedTypeReference
impl Sync for ResolvedTypeReference
impl Unpin for ResolvedTypeReference
impl UnsafeUnpin for ResolvedTypeReference
impl UnwindSafe for ResolvedTypeReference
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