MCPcopy Create free account
hub / github.com/dgraph-io/dgraph-benchmarks / MarshalToSizedBuffer

Method MarshalToSizedBuffer

bitmap/pb.pb.go:9122–9151  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

9120}
9121
9122func (m *Function) MarshalToSizedBuffer(dAtA []byte) (int, error) {
9123 i := len(dAtA)
9124 _ = i
9125 var l int
9126 _ = l
9127 if len(m.Args) > 0 {
9128 for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- {
9129 i -= len(m.Args[iNdEx])
9130 copy(dAtA[i:], m.Args[iNdEx])
9131 i = encodeVarintPb(dAtA, i, uint64(len(m.Args[iNdEx])))
9132 i--
9133 dAtA[i] = 0x1a
9134 }
9135 }
9136 if len(m.Key) > 0 {
9137 i -= len(m.Key)
9138 copy(dAtA[i:], m.Key)
9139 i = encodeVarintPb(dAtA, i, uint64(len(m.Key)))
9140 i--
9141 dAtA[i] = 0x12
9142 }
9143 if len(m.Name) > 0 {
9144 i -= len(m.Name)
9145 copy(dAtA[i:], m.Name)
9146 i = encodeVarintPb(dAtA, i, uint64(len(m.Name)))
9147 i--
9148 dAtA[i] = 0xa
9149 }
9150 return len(dAtA) - i, nil
9151}
9152
9153func (m *FilterTree) Marshal() (dAtA []byte, err error) {
9154 size := m.Size()

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintPbFunction · 0.85

Tested by

no test coverage detected