pub enum DotAccessResolution {
Unresolved,
StructField {
is_exported: bool,
declaring_type: Option<Symbol>,
},
TupleStructField {
index: usize,
is_newtype: bool,
},
TupleElement {
index: usize,
},
PackageMember {
definition: Option<Symbol>,
instantiation: SubstitutionMap,
},
EnumVariant {
definition: Symbol,
instantiation: SubstitutionMap,
},
InstanceMethod {
is_exported: bool,
receiver_coercion: Option<ReceiverCoercion>,
method: Option<MethodName>,
instantiation: SubstitutionMap,
},
InstanceMethodValue {
is_exported: bool,
method: Option<MethodName>,
instantiation: SubstitutionMap,
},
StaticMethod {
is_exported: bool,
definition: Symbol,
instantiation: SubstitutionMap,
},
}Expand description
What a dot access resolved to during type checking.
Variants§
Unresolved
StructField
Named struct field access
TupleStructField
Tuple struct field access (e.g., point.0 on struct Point(int, int)).
is_newtype is true when the struct has exactly 1 field and no generics,
meaning access should emit a type cast rather than .F0.
TupleElement
Tuple element access (e.g., t.0, t.1)
PackageMember
Package member access (e.g., mod.func)
EnumVariant
ADT enum variant constructor (e.g., makeColorRed[T]())
InstanceMethod
Instance method (has self receiver)
Fields
§
receiver_coercion: Option<ReceiverCoercion>§
method: Option<MethodName>§
instantiation: SubstitutionMapInstanceMethodValue
Instance method used as a first-class value (not called).
E.g., Point.area used as a callback.
StaticMethod
Static method (no self receiver)
Implementations§
Source§impl DotAccessResolution
impl DotAccessResolution
pub fn reads_receiver(&self) -> bool
pub fn is_field_read(&self) -> bool
pub fn declaring_type(&self) -> Option<&Symbol>
pub fn receiver_coercion(&self) -> Option<ReceiverCoercion>
pub fn defined_name(&self) -> Option<&Symbol>
pub fn method(&self) -> Option<&MethodName>
pub fn callee_name(&self) -> Option<CalleeName>
pub fn instantiation(&self) -> Option<&SubstitutionMap>
Trait Implementations§
Source§impl Clone for DotAccessResolution
impl Clone for DotAccessResolution
Source§impl Debug for DotAccessResolution
impl Debug for DotAccessResolution
impl Eq for DotAccessResolution
Source§impl PartialEq for DotAccessResolution
impl PartialEq for DotAccessResolution
impl StructuralPartialEq for DotAccessResolution
Auto Trait Implementations§
impl Forget for DotAccessResolution
impl Freeze for DotAccessResolution
impl Move for DotAccessResolution
impl RefUnwindSafe for DotAccessResolution
impl Send for DotAccessResolution
impl Sync for DotAccessResolution
impl Unpin for DotAccessResolution
impl UnsafeUnpin for DotAccessResolutionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(EcoString, Type)>: UnsafeUnpin,
impl UnwindSafe for DotAccessResolutionwhere
NonNull<u8>: UnwindSafe,
RawVecInner: UnwindSafe,
Arc<Box<[Type]>>: UnwindSafe,
Arc<FunctionType>: UnwindSafe,
BoxRaw<Type>: UnwindSafe,
Arc<Spelling>: UnwindSafe,
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