Represents a protobuf field key, storing a field number and wire type (WireType).
Public Member Functions | |
| constexpr | FieldKey (uint32_t field_number, WireType wire_type) |
| constexpr | FieldKey (uint32_t key) |
| constexpr | operator uint32_t () |
| constexpr uint32_t | field_number () const |
| constexpr WireType | wire_type () const |
Static Public Member Functions | |
| static constexpr bool | IsValidKey (uint64_t key) |
|
inlineconstexpr |
Creates a field key with the given field number and wire type.
| [in] | field_number | The field number for the field. |
| [in] | wire_type | The wire type (WireType) of the field. |
ValidFieldNumber(field_number)).
|
inlineconstexpr |
Parses a field key from its encoded representation.
| [in] | key | The raw integer representation of the key. |
IsValidKey(key)).
|
inlinestaticconstexpr |
Checks if the given encoded protobuf key is valid.
Must be called before instantiating a FieldKey object from an integer key.
| [in] | key | The raw encoded key value. |
true if the key contains a valid field number and wire type.