(ctx *ReadContext, value reflect.Value)
| 536 | } |
| 537 | |
| 538 | func (s uint8ArraySerializer) ReadData(ctx *ReadContext, value reflect.Value) { |
| 539 | buf := ctx.Buffer() |
| 540 | length := ctx.ReadBinaryLength() |
| 541 | if _, ok := checkWireArraySize(ctx, length, 1, value); !ok { |
| 542 | return |
| 543 | } |
| 544 | if length > 0 { |
| 545 | // Direct memory copy - uint8 is 1 byte |
| 546 | ptr := value.Addr().UnsafePointer() |
| 547 | buf.Read(unsafe.Slice((*byte)(ptr), length)) |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | func (s uint8ArraySerializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) { |
| 552 | done := readArrayRefAndType(ctx, refMode, readType, value) |
no test coverage detected