MCPcopy Create free account
hub / github.com/araddon/qlbridge / MarshalTo

Method MarshalTo

expr/node.pb.go:555–583  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

553}
554
555func (m *IncludeNodePb) MarshalTo(data []byte) (int, error) {
556 var i int
557 _ = i
558 var l int
559 _ = l
560 data[i] = 0x8
561 i++
562 i = encodeVarintNode(data, i, uint64(m.Op))
563 data[i] = 0x10
564 i++
565 if m.Negated {
566 data[i] = 1
567 } else {
568 data[i] = 0
569 }
570 i++
571 data[i] = 0x1a
572 i++
573 i = encodeVarintNode(data, i, uint64(m.Identity.Size()))
574 n13, err := m.Identity.MarshalTo(data[i:])
575 if err != nil {
576 return 0, err
577 }
578 i += n13
579 if m.XXX_unrecognized != nil {
580 i += copy(data[i:], m.XXX_unrecognized)
581 }
582 return i, nil
583}
584
585func (m *UnaryNodePb) Marshal() (data []byte, err error) {
586 size := m.Size()

Callers 1

MarshalMethod · 0.95

Calls 3

encodeVarintNodeFunction · 0.85
SizeMethod · 0.45
MarshalToMethod · 0.45

Tested by

no test coverage detected