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

Method MarshalTo

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

Source from the content-addressed store, hash-verified

670}
671
672func (m *TriNodePb) MarshalTo(data []byte) (int, error) {
673 var i int
674 _ = i
675 var l int
676 _ = l
677 data[i] = 0x8
678 i++
679 i = encodeVarintNode(data, i, uint64(m.Op))
680 if len(m.Args) > 0 {
681 for _, msg := range m.Args {
682 data[i] = 0x12
683 i++
684 i = encodeVarintNode(data, i, uint64(msg.Size()))
685 n, err := msg.MarshalTo(data[i:])
686 if err != nil {
687 return 0, err
688 }
689 i += n
690 }
691 }
692 if m.XXX_unrecognized != nil {
693 i += copy(data[i:], m.XXX_unrecognized)
694 }
695 return i, nil
696}
697
698func (m *ArrayNodePb) Marshal() (data []byte, err error) {
699 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