Documentation ¶
Index ¶
- func StructFields(t reflect.Type) map[string]Nature
- type Nature
- func (n Nature) All() map[string]Nature
- func (n Nature) AssignableTo(nt Nature) bool
- func (n Nature) Deref() Nature
- func (n Nature) Elem() Nature
- func (n Nature) FieldByName(name string) (Nature, bool)
- func (n Nature) Get(name string) (Nature, bool)
- func (n Nature) In(i int) Nature
- func (n Nature) IsFastMap() bool
- func (n Nature) IsVariadic() bool
- func (n Nature) Key() Nature
- func (n Nature) Kind() reflect.Kind
- func (n Nature) MethodByName(name string) (Nature, bool)
- func (n Nature) NumIn() int
- func (n Nature) NumOut() int
- func (n Nature) Out(i int) Nature
- func (n Nature) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Nature ¶
type Nature struct { Type reflect.Type // Type of the value. If nil, then value is unknown. Func *builtin.Function // Used to pass function type from callee to CallNode. ArrayOf *Nature // Elem nature of array type (usually Type is []any, but ArrayOf can be any nature). PredicateOut *Nature // Out nature of predicate. Fields map[string]Nature // Fields of map type. Strict bool // If map is types.StrictMap. Nil bool // If value is nil. Method bool // If value retrieved from method. Usually used to determine amount of in arguments. MethodIndex int // Index of method in type. FieldIndex []int // Index of field in type. }
func (Nature) AssignableTo ¶
func (Nature) IsVariadic ¶
Click to show internal directories.
Click to hide internal directories.