MCPcopy Create free account
hub / github.com/apache/fory / Read

Method Read

go/fory/slice_primitive.go:204–214  ·  view source on GitHub ↗
(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value)

Source from the content-addressed store, hash-verified

202}
203
204func (s int16SliceSerializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) {
205 done, typeId := readSliceRefAndType(ctx, refMode, readType, value)
206 if done || ctx.HasError() {
207 return
208 }
209 if readType && typeId != uint32(INT16_ARRAY) {
210 ctx.SetError(DeserializationErrorf("slice type mismatch: expected INT16_ARRAY (%d), got %d", INT16_ARRAY, typeId))
211 return
212 }
213 s.ReadData(ctx, value)
214}
215
216func (s int16SliceSerializer) ReadWithTypeInfo(ctx *ReadContext, refMode RefMode, typeInfo *TypeInfo, value reflect.Value) {
217 s.Read(ctx, refMode, false, false, value)

Callers 1

ReadWithTypeInfoMethod · 0.95

Calls 6

ReadDataMethod · 0.95
readSliceRefAndTypeFunction · 0.85
DeserializationErrorfFunction · 0.85
uint32Function · 0.50
HasErrorMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected