@@ -47,6 +47,7 @@ type Binding struct {
47
47
// Can also rename fields by UpdateStructDescriptor.
48
48
type Extension interface {
49
49
UpdateStructDescriptor (structDescriptor * StructDescriptor )
50
+ StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type )
50
51
CreateMapKeyDecoder (typ reflect2.Type ) ValDecoder
51
52
CreateMapKeyEncoder (typ reflect2.Type ) ValEncoder
52
53
CreateDecoder (typ reflect2.Type ) ValDecoder
@@ -63,6 +64,10 @@ type DummyExtension struct {
63
64
func (extension * DummyExtension ) UpdateStructDescriptor (structDescriptor * StructDescriptor ) {
64
65
}
65
66
67
+ // StructFieldDecodedHook No-op
68
+ func (extension * DummyExtension ) StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type ) {
69
+ }
70
+
66
71
// CreateMapKeyDecoder No-op
67
72
func (extension * DummyExtension ) CreateMapKeyDecoder (typ reflect2.Type ) ValDecoder {
68
73
return nil
@@ -99,6 +104,10 @@ type EncoderExtension map[reflect2.Type]ValEncoder
99
104
func (extension EncoderExtension ) UpdateStructDescriptor (structDescriptor * StructDescriptor ) {
100
105
}
101
106
107
+ // StructFieldDecodedHook No-op
108
+ func (extension EncoderExtension ) StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type ) {
109
+ }
110
+
102
111
// CreateDecoder No-op
103
112
func (extension EncoderExtension ) CreateDecoder (typ reflect2.Type ) ValDecoder {
104
113
return nil
@@ -135,6 +144,10 @@ type DecoderExtension map[reflect2.Type]ValDecoder
135
144
func (extension DecoderExtension ) UpdateStructDescriptor (structDescriptor * StructDescriptor ) {
136
145
}
137
146
147
+ // StructFieldDecodedHook No-op
148
+ func (extension DecoderExtension ) StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type ) {
149
+ }
150
+
138
151
// CreateMapKeyDecoder No-op
139
152
func (extension DecoderExtension ) CreateMapKeyDecoder (typ reflect2.Type ) ValDecoder {
140
153
return nil
0 commit comments