Size implements proto.Sizer.
()
| 277 | |
| 278 | // Size implements proto.Sizer. |
| 279 | func (bs *LabelAdapter) Size() (n int) { |
| 280 | ls := (*labels.Label)(bs) |
| 281 | if bs == nil { |
| 282 | return 0 |
| 283 | } |
| 284 | var l int |
| 285 | _ = l |
| 286 | l = len(ls.Name) |
| 287 | if l > 0 { |
| 288 | n += 1 + l + sovCortex(uint64(l)) |
| 289 | } |
| 290 | l = len(ls.Value) |
| 291 | if l > 0 { |
| 292 | n += 1 + l + sovCortex(uint64(l)) |
| 293 | } |
| 294 | return n |
| 295 | } |
| 296 | |
| 297 | // Equal implements proto.Equaler. |
| 298 | func (bs *LabelAdapter) Equal(other LabelAdapter) bool { |