pub enum DotAccessKind {
StructField {
is_exported: bool,
},
TupleStructField {
is_newtype: bool,
},
TupleElement,
ModuleMember,
ValueEnumVariant,
EnumVariant,
InstanceMethod {
is_exported: bool,
},
InstanceMethodValue {
is_exported: bool,
is_pointer_receiver: bool,
},
StaticMethod {
is_exported: bool,
},
}Expand description
What a dot access resolved to during type checking.
Variants§
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)
ModuleMember
Module member access (e.g., mod.func)
ValueEnumVariant
Value enum variant (Go constant, e.g., reflect.String)
EnumVariant
ADT enum variant constructor (e.g., makeColorRed[T]())
InstanceMethod
Instance method (has self receiver)
InstanceMethodValue
Instance method used as a first-class value (not called).
E.g., Point.area used as a callback. The emitter needs to know
whether the receiver is a pointer to emit Go method expression syntax.
StaticMethod
Static method (no self receiver)
Trait Implementations§
Source§impl Clone for DotAccessKind
impl Clone for DotAccessKind
Source§fn clone(&self) -> DotAccessKind
fn clone(&self) -> DotAccessKind
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 DotAccessKind
impl Debug for DotAccessKind
Source§impl PartialEq for DotAccessKind
impl PartialEq for DotAccessKind
Source§fn eq(&self, other: &DotAccessKind) -> bool
fn eq(&self, other: &DotAccessKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DotAccessKind
impl Eq for DotAccessKind
impl StructuralPartialEq for DotAccessKind
Auto Trait Implementations§
impl Freeze for DotAccessKind
impl RefUnwindSafe for DotAccessKind
impl Send for DotAccessKind
impl Sync for DotAccessKind
impl Unpin for DotAccessKind
impl UnsafeUnpin for DotAccessKind
impl UnwindSafe for DotAccessKind
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