class ProtoField

Defined at line 240 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

absl::Span

<const

char> represents a view into the un-processed space in a

buffer during decoding. Decoding functions shrink the span as they go so

that the same view can be decoded iteratively until all data are processed.

In general, if the buffer is exhausted but additional bytes are expected by

the decoder, it will return values as if the additional bytes were zeros.

Length-delimited fields are an exception - if the encoded length field

indicates more data bytes than are available in the buffer, the `bytes_value`

and `string_value` accessors will return truncated views.

Public Methods

bool DecodeFrom (absl::Span<const char> * data)

Consumes bytes from `data` and returns true if there were any bytes to

decode.

uint64_t tag ()

Defined at line 245 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

WireType type ()

Defined at line 246 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

double double_value ()

These value accessors will return nonsense if the data were not encoded in

the corresponding wiretype from the corresponding C++ (or other language)

type.

Defined at line 252 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

float float_value ()

Defined at line 253 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

int32_t int32_value ()

Defined at line 256 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

int64_t int64_value ()

Defined at line 257 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

int32_t sint32_value ()

Defined at line 258 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

int64_t sint64_value ()

Defined at line 262 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

uint32_t uint32_value ()

Defined at line 266 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

uint64_t uint64_value ()

Defined at line 267 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

bool bool_value ()

Defined at line 268 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

absl::Span<const char> bytes_value ()

To decode fields within a submessage field, call

`DecodeNextField(field.BytesValue())`.

Defined at line 275 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

absl::string_view string_value ()

Defined at line 276 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h

uint64_t encoded_length ()

Returns the encoded length of a length-delimited field. This equals

`bytes_value().size()` except when the latter has been truncated due to

buffer underrun.

Defined at line 283 of file ../../third_party/abseil-cpp/src/absl/log/internal/proto.h