@@ -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
+ StructDecodedHook (ptr unsafe.Pointer , typ reflect2.Type )
50
51
StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type )
51
52
CreateMapKeyDecoder (typ reflect2.Type ) ValDecoder
52
53
CreateMapKeyEncoder (typ reflect2.Type ) ValEncoder
@@ -64,6 +65,10 @@ type DummyExtension struct {
64
65
func (extension * DummyExtension ) UpdateStructDescriptor (structDescriptor * StructDescriptor ) {
65
66
}
66
67
68
+ // StructDecodedHook No-op
69
+ func (extension * DummyExtension ) StructDecodedHook (ptr unsafe.Pointer , typ reflect2.Type ) {
70
+ }
71
+
67
72
// StructFieldDecodedHook No-op
68
73
func (extension * DummyExtension ) StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type ) {
69
74
}
@@ -104,6 +109,10 @@ type EncoderExtension map[reflect2.Type]ValEncoder
104
109
func (extension EncoderExtension ) UpdateStructDescriptor (structDescriptor * StructDescriptor ) {
105
110
}
106
111
112
+ // StructDecodedHook No-op
113
+ func (extension EncoderExtension ) StructDecodedHook (ptr unsafe.Pointer , typ reflect2.Type ) {
114
+ }
115
+
107
116
// StructFieldDecodedHook No-op
108
117
func (extension EncoderExtension ) StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type ) {
109
118
}
@@ -144,6 +153,10 @@ type DecoderExtension map[reflect2.Type]ValDecoder
144
153
func (extension DecoderExtension ) UpdateStructDescriptor (structDescriptor * StructDescriptor ) {
145
154
}
146
155
156
+ // StructDecodedHook No-op
157
+ func (extension DecoderExtension ) StructDecodedHook (ptr unsafe.Pointer , typ reflect2.Type ) {
158
+ }
159
+
147
160
// StructFieldDecodedHook No-op
148
161
func (extension DecoderExtension ) StructFieldDecodedHook (field string , ptr unsafe.Pointer , typ reflect2.Type ) {
149
162
}
0 commit comments