Documentation ¶
Index ¶
- type GetFieldFunc
- type MapValue
- func (m *MapValue) Append(name string, callback GetFieldFunc)
- func (m *MapValue) Contains(key ref.Val) ref.Val
- func (m *MapValue) ConvertToNative(typeDesc reflect.Type) (any, error)
- func (m *MapValue) ConvertToType(typeVal ref.Type) ref.Val
- func (m *MapValue) Equal(other ref.Val) ref.Val
- func (m *MapValue) Find(key ref.Val) (ref.Val, bool)
- func (m *MapValue) Get(key ref.Val) ref.Val
- func (m *MapValue) Iterator() traits.Iterator
- func (m *MapValue) Size() ref.Val
- func (m *MapValue) Type() ref.Type
- func (m *MapValue) Value() any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetFieldFunc ¶
type MapValue ¶
type MapValue struct {
// contains filtered or unexported fields
}
MapValue is a map that lazily evaluate its value when a field is first accessed. The map value is not designed to be thread-safe.
func NewMapValue ¶
func (*MapValue) Append ¶
func (m *MapValue) Append(name string, callback GetFieldFunc)
Append adds the given field with its name and callback.
func (*MapValue) ConvertToNative ¶
ConvertToNative returns an error because it is disallowed
func (*MapValue) ConvertToType ¶
ConvertToType converts the map to the given type. Only its own type and "Type" type are allowed.
Click to show internal directories.
Click to hide internal directories.