unsafeType.safeType.Typereflect.TypeelemRTypeunsafe.PointerelemSizeuintptrlikePtrboolpElemRTypeunsafe.PointerunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) GetIndex(obj interface{}, index int) interface{}(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})(*T) SetIndex(obj interface{}, index int, elem interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeGetIndex(obj unsafe.Pointer, index int) unsafe.Pointer(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)(*T) UnsafeSetIndex(obj unsafe.Pointer, index int, elem unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
*T : ArrayType
T : InterfaceType
*T : ListType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
func newUnsafeArrayType(cfg *frozenConfig, type1 reflect.Type) *UnsafeArrayType
unsafeType.safeType.Typereflect.TypeunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
func newUnsafeEFaceType(cfg *frozenConfig, type1 reflect.Type) *UnsafeEFaceType
unsafeType.safeType.Typereflect.TypeunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
func newUnsafeIFaceType(cfg *frozenConfig, type1 reflect.Type) *UnsafeIFaceType
unsafeType.safeType.Typereflect.TypepElemRTypeunsafe.PointerpKeyRTypeunsafe.PointerunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) GetIndex(obj interface{}, key interface{}) interface{}(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
(*T) Iterate(obj interface{}) MapIterator(*T) Key() Type
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool(*T) MakeMap(cap int) interface{}
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})(*T) SetIndex(obj interface{}, key interface{}, elem interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) TryGetIndex(obj interface{}, key interface{}) (interface{}, bool)(*T) Type1() reflect.Type(*T) UnsafeGetIndex(obj unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeIterate(obj unsafe.Pointer) MapIterator(*T) UnsafeMakeMap(cap int) unsafe.Pointer(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)(*T) UnsafeSetIndex(obj unsafe.Pointer, key unsafe.Pointer, elem unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : MapType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
unsafeType.safeType.Typereflect.TypeunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
func newUnsafePtrType(cfg *frozenConfig, type1 reflect.Type) *UnsafePtrType
unsafeType.safeType.Typereflect.TypeelemRTypeunsafe.PointerelemSizeuintptrpElemRTypeunsafe.PointerunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) Append(obj interface{}, elem interface{})(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
(*T) Cap(obj interface{}) int
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) GetIndex(obj interface{}, index int) interface{}(*T) Grow(obj interface{}, newLength int)(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LengthOf(obj interface{}) int(*T) LikePtr() bool(*T) MakeSlice(length int, cap int) interface{}
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})(*T) SetIndex(obj interface{}, index int, elem interface{})(*T) SetNil(obj interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeAppend(obj unsafe.Pointer, elem unsafe.Pointer)(*T) UnsafeCap(ptr unsafe.Pointer) int(*T) UnsafeGetIndex(obj unsafe.Pointer, index int) unsafe.Pointer(*T) UnsafeGrow(obj unsafe.Pointer, newLength int)(*T) UnsafeIndirect(obj unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeLengthOf(obj unsafe.Pointer) int(*T) UnsafeMakeSlice(length int, cap int) unsafe.Pointer(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)(*T) UnsafeSetIndex(obj unsafe.Pointer, index int, elem unsafe.Pointer)(*T) UnsafeSetNil(ptr unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
*T : ArrayType
T : InterfaceType
*T : ListType
*T : PtrType
*T : SliceType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
unsafeType.safeType.Typereflect.TypelikePtrboolunsafeTypeunsafeTypeunsafeType.ptrRTypeunsafe.PointerunsafeType.rtypeunsafe.PointerunsafeType.safeTypesafeTypeunsafeType.safeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type(*T) Field(i int) StructField
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
(*T) FieldByIndex(index []int) StructField(*T) FieldByName(name string) StructField(*T) FieldByNameFunc(match func(string) bool) StructField(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : StructType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
func newUnsafeStructType(cfg *frozenConfig, type1 reflect.Type) *UnsafeStructType
func newUnsafeStructField(structType *UnsafeStructType, structField reflect.StructField) *UnsafeStructField
A hash iteration structure.
If you modify hiter, also change cmd/internal/gc/reflect.go to indicate
the layout of this structure.
// Must be in first position. Write nil to indicate iteration end (see cmd/internal/gc/range.go).
// Must be in second position (see cmd/internal/gc/range.go).
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) *hiter
func mapiternext(it *hiter)
safeType.Typereflect.TypesafeTypesafeTypesafeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) GetIndex(obj interface{}, key interface{}) interface{}(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
(*T) Iterate(obj interface{}) MapIterator(*T) Key() Type
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool(*T) MakeMap(cap int) interface{}
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})(*T) SetIndex(obj interface{}, key interface{}, elem interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) TryGetIndex(obj interface{}, key interface{}) (interface{}, bool)(*T) Type1() reflect.Type(*T) UnsafeGetIndex(obj unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeIterate(obj unsafe.Pointer) MapIterator(*T) UnsafeMakeMap(cap int) unsafe.Pointer(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)(*T) UnsafeSetIndex(obj unsafe.Pointer, key unsafe.Pointer, elem unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : MapType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
safeType.Typereflect.TypesafeTypesafeTypesafeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) Append(obj interface{}, elem interface{})(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
(*T) Cap(obj interface{}) int
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) GetIndex(obj interface{}, index int) interface{}(*T) Grow(obj interface{}, newLength int)(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LengthOf(obj interface{}) int(*T) LikePtr() bool(*T) MakeSlice(length int, cap int) interface{}
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})(*T) SetIndex(obj interface{}, index int, value interface{})(*T) SetNil(obj interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeAppend(obj unsafe.Pointer, elem unsafe.Pointer)(*T) UnsafeCap(ptr unsafe.Pointer) int(*T) UnsafeGetIndex(obj unsafe.Pointer, index int) unsafe.Pointer(*T) UnsafeGrow(ptr unsafe.Pointer, newLength int)(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeLengthOf(ptr unsafe.Pointer) int(*T) UnsafeMakeSlice(length int, cap int) unsafe.Pointer(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)(*T) UnsafeSetIndex(obj unsafe.Pointer, index int, value unsafe.Pointer)(*T) UnsafeSetNil(ptr unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
*T : ArrayType
T : InterfaceType
*T : ListType
*T : PtrType
*T : SliceType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
safeType.Typereflect.TypesafeTypesafeTypesafeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type(*T) Field(i int) StructField
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
(*T) FieldByIndex(index []int) StructField(*T) FieldByName(name string) StructField(*T) FieldByNameFunc(match func(string) bool) StructField(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : StructType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
Typereflect.Typecfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(ptr unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
safeType.Typereflect.TypeptrRTypeunsafe.Pointerrtypeunsafe.PointersafeTypesafeTypesafeType.cfg*frozenConfig
Align returns the alignment in bytes of a value of
this type when allocated in memory.
(*T) AssignableTo(anotherType Type) bool
Bits returns the size of the type in bits.
It panics if the type's Kind is not one of the
sized or unsized Int, Uint, Float, or Complex kinds.
ChanDir returns a channel type's direction.
It panics if the type's Kind is not Chan.
Comparable reports whether values of this type are comparable.
ConvertibleTo reports whether a value of the type is convertible to type u.
(*T) Elem() Type
Field returns a struct type's i'th field.
It panics if the type's Kind is not Struct.
It panics if i is not in the range [0, NumField()).
FieldAlign returns the alignment in bytes of a value of
this type when used as a field in a struct.
FieldByIndex returns the nested field corresponding
to the index sequence. It is equivalent to calling Field
successively for each index i.
It panics if the type's Kind is not Struct.
FieldByName returns the struct field with the given name
and a boolean indicating if the field was found.
FieldByNameFunc returns the struct field with a name
that satisfies the match function and a boolean indicating if
the field was found.
FieldByNameFunc considers the fields in the struct itself
and then the fields in any embedded structs, in breadth first order,
stopping at the shallowest nesting depth containing one or more
fields satisfying the match function. If multiple fields at that depth
satisfy the match function, they cancel each other
and FieldByNameFunc returns no match.
This behavior mirrors Go's handling of name lookup in
structs containing embedded fields.
(*T) Implements(thatType Type) bool
In returns the type of a function type's i'th input parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumIn()).
(*T) Indirect(obj interface{}) interface{}(*T) IsNil(obj interface{}) bool(*T) IsNullable() bool
IsVariadic reports whether a function type's final input parameter
is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
implicit actual type []T.
For concreteness, if t represents func(x int, y ... float64), then
t.NumIn() == 2
t.In(0) is the reflect.Type for "int"
t.In(1) is the reflect.Type for "[]float64"
t.IsVariadic() == true
IsVariadic panics if the type's Kind is not Func.
Key returns a map type's key type.
It panics if the type's Kind is not Map.
Kind returns the specific kind of this type.
Len returns an array type's length.
It panics if the type's Kind is not Array.
(*T) LikePtr() bool
Method returns the i'th method in the type's method set.
It panics if i is not in the range [0, NumMethod()).
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver,
and only exported methods are accessible.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Methods are sorted in lexicographic order.
MethodByName returns the method with that name in the type's
method set and a boolean indicating if the method was found.
For a non-interface type T or *T, the returned Method's Type and Func
fields describe a function whose first argument is the receiver.
For an interface type, the returned Method's Type field gives the
method signature, without a receiver, and the Func field is nil.
Name returns the type's name within its package for a defined type.
For other (non-defined) types it returns the empty string.
(*T) New() interface{}
NumField returns a struct type's field count.
It panics if the type's Kind is not Struct.
NumIn returns a function type's input parameter count.
It panics if the type's Kind is not Func.
NumMethod returns the number of methods accessible using Method.
Note that NumMethod counts unexported methods only for interface types.
NumOut returns a function type's output parameter count.
It panics if the type's Kind is not Func.
Out returns the type of a function type's i'th output parameter.
It panics if the type's Kind is not Func.
It panics if i is not in the range [0, NumOut()).
(*T) PackEFace(ptr unsafe.Pointer) interface{}
PkgPath returns a defined type's package path, that is, the import path
that uniquely identifies the package, such as "encoding/base64".
If the type was predeclared (string, error) or not defined (*T, struct{},
[]int, or A where A is an alias for a non-defined type), the package path
will be the empty string.
(*T) RType() uintptr(*T) Set(obj interface{}, val interface{})
Size returns the number of bytes needed to store
a value of the given type; it is analogous to unsafe.Sizeof.
String returns a string representation of the type.
The string representation may use shortened package names
(e.g., base64 instead of "encoding/base64") and is not
guaranteed to be unique among types. To test for type identity,
compare the Types directly.
(*T) Type1() reflect.Type(*T) UnsafeIndirect(obj unsafe.Pointer) interface{}(*T) UnsafeIsNil(ptr unsafe.Pointer) bool(*T) UnsafeNew() unsafe.Pointer(*T) UnsafeSet(ptr unsafe.Pointer, val unsafe.Pointer)( T) common() *reflect.rtype( T) uncommon() *reflect.uncommonType
T : InterfaceType
*T : PtrType
*T : Type
T : fmt.Stringer
T : context.stringer
T : os/signal.stringer
T : runtime.stringer
func newUnsafeType(cfg *frozenConfig, type1 reflect.Type) *unsafeType
Package-Level Functions (total 48, in which 14 are exported)
DefaultTypeOfKind return the non aliased default type for the kind
NoEscape hides a pointer from escape analysis. noescape is
the identity function but escape analysis doesn't think the
output depends on the input. noescape is inlined and currently
compiles down to zero instructions.
USE CAREFULLY!
add returns p+x.
The whySafe string is ignored, so that the function still inlines
as efficiently as p+x, but all call sites should use the string to
record why the addition is safe, which is to say why the addition
does not cause x to advance to the very end of p's allocation
and therefore point incorrectly at the next block in memory.
arrayAt returns the i-th element of p,
an array whose elements are eltSize bytes wide.
The array pointed at by p must have at least i+1 elements:
it is invalid (but impossible to check here) to pass i >= len,
because then the result will point outside the array.
whySafe must explain why i < len. (Passing "i < len" is fine;
the benefit is to surface this assumption at the call site.)
The pages are generated with Goldsv0.3.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.