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

Method WriteData

go/fory/enum_test.go:37–42  ·  view source on GitHub ↗
(ctx *WriteContext, value reflect.Value)

Source from the content-addressed store, hash-verified

35type idLimitExtSerializer struct{}
36
37func (s *idLimitExtSerializer) WriteData(ctx *WriteContext, value reflect.Value) {
38 if value.Kind() == reflect.Ptr {
39 value = value.Elem()
40 }
41 ctx.Buffer().WriteVarint32(value.Interface().(idLimitExt).ID)
42}
43
44func (s *idLimitExtSerializer) ReadData(ctx *ReadContext, value reflect.Value) {
45 value.Set(reflect.ValueOf(idLimitExt{ID: ctx.Buffer().ReadVarint32(ctx.Err())}))

Callers

nothing calls this directly

Calls 3

KindMethod · 0.80
WriteVarint32Method · 0.45
BufferMethod · 0.45

Tested by

no test coverage detected