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

Method ReadData

go/fory/primitive.go:636–645  ·  view source on GitHub ↗
(ctx *ReadContext, value reflect.Value)

Source from the content-addressed store, hash-verified

634}
635
636func (s float16Serializer) ReadData(ctx *ReadContext, value reflect.Value) {
637 err := ctx.Err()
638 // Read uint16 bits
639 bits := ctx.buffer.ReadUint16(err)
640 if ctx.HasError() {
641 return
642 }
643 // Set the value. Since Float16 is uint16, SetUint works.
644 value.SetUint(uint64(bits))
645}
646
647func (s float16Serializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) {
648 err := ctx.Err()

Callers 1

ReadMethod · 0.95

Calls 4

ReadUint16Method · 0.80
uint64Function · 0.50
ErrMethod · 0.45
HasErrorMethod · 0.45

Tested by

no test coverage detected