#include "pw_bytes/span.h"
#include "pw_protobuf/decoder.h"
#include "pw_protobuf/stream_decoder.h"
#include "pw_result/result.h"
#include "pw_status/try.h"
#include "pw_string/string.h"
Go to the source code of this file.
Classes | |
class | pw::protobuf::Finder< T, kReadFn > |
class | pw::protobuf::StreamFinder< T, kReadFn > |
class | pw::protobuf::EnumFinder< T > |
class | pw::protobuf::EnumStreamFinder< T > |
Namespaces | |
namespace | pw |
Provides basic helpers for reading and writing UTF-8 encoded strings. | |
Functions | |
Status | pw::protobuf::internal::AdvanceToField (Decoder &decoder, uint32_t field_number) |
Status | pw::protobuf::internal::AdvanceToField (StreamDecoder &decoder, uint32_t field_number) |
template<typename T , auto kReadFn> | |
Result< T > | pw::protobuf::internal::Find (ConstByteSpan message, uint32_t field_number) |
template<typename T , auto kReadFn> | |
Result< T > | pw::protobuf::internal::Find (stream::Reader &reader, uint32_t field_number) |
Result< uint32_t > | pw::protobuf::FindUint32 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a uint32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint32_t > | pw::protobuf::FindUint32 (ConstByteSpan message, T field) |
Result< uint32_t > | pw::protobuf::FindUint32 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a uint32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint32_t > | pw::protobuf::FindUint32 (stream::Reader &message_stream, T field) |
Result< int32_t > | pw::protobuf::FindInt32 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for an int32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int32_t > | pw::protobuf::FindInt32 (ConstByteSpan message, T field) |
Result< int32_t > | pw::protobuf::FindInt32 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for an int32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int32_t > | pw::protobuf::FindInt32 (stream::Reader &message_stream, T field) |
Result< int32_t > | pw::protobuf::FindSint32 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for an sint32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int32_t > | pw::protobuf::FindSint32 (ConstByteSpan message, T field) |
Result< int32_t > | pw::protobuf::FindSint32 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for an sint32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int32_t > | pw::protobuf::FindSint32 (stream::Reader &message_stream, T field) |
Result< uint64_t > | pw::protobuf::FindUint64 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a uint64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint64_t > | pw::protobuf::FindUint64 (ConstByteSpan message, T field) |
Result< uint64_t > | pw::protobuf::FindUint64 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a uint64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint64_t > | pw::protobuf::FindUint64 (stream::Reader &message_stream, T field) |
Result< int64_t > | pw::protobuf::FindInt64 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for an int64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int64_t > | pw::protobuf::FindInt64 (ConstByteSpan message, T field) |
Result< int64_t > | pw::protobuf::FindInt64 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for an int64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int64_t > | pw::protobuf::FindInt64 (stream::Reader &message_stream, T field) |
Result< int64_t > | pw::protobuf::FindSint64 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for an sint64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int64_t > | pw::protobuf::FindSint64 (ConstByteSpan message, T field) |
Result< int64_t > | pw::protobuf::FindSint64 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for an sint64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int64_t > | pw::protobuf::FindSint64 (stream::Reader &message_stream, T field) |
Result< bool > | pw::protobuf::FindBool (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a bool field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< bool > | pw::protobuf::FindBool (ConstByteSpan message, T field) |
Result< bool > | pw::protobuf::FindBool (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a bool field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< bool > | pw::protobuf::FindBool (stream::Reader &message_stream, T field) |
Result< uint32_t > | pw::protobuf::FindFixed32 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a fixed32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint32_t > | pw::protobuf::FindFixed32 (ConstByteSpan message, T field) |
Result< uint32_t > | pw::protobuf::FindFixed32 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a fixed32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint32_t > | pw::protobuf::FindFixed32 (stream::Reader &message_stream, T field) |
Result< uint64_t > | pw::protobuf::FindFixed64 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a fixed64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint64_t > | pw::protobuf::FindFixed64 (ConstByteSpan message, T field) |
Result< uint64_t > | pw::protobuf::FindFixed64 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a fixed64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< uint64_t > | pw::protobuf::FindFixed64 (stream::Reader &message_stream, T field) |
Result< int32_t > | pw::protobuf::FindSfixed32 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for an sfixed32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int32_t > | pw::protobuf::FindSfixed32 (ConstByteSpan message, T field) |
Result< int32_t > | pw::protobuf::FindSfixed32 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for an sfixed32 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int32_t > | pw::protobuf::FindSfixed32 (stream::Reader &message_stream, T field) |
Result< int64_t > | pw::protobuf::FindSfixed64 (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for an sfixed64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int64_t > | pw::protobuf::FindSfixed64 (ConstByteSpan message, T field) |
Result< int64_t > | pw::protobuf::FindSfixed64 (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for an sfixed64 field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< int64_t > | pw::protobuf::FindSfixed64 (stream::Reader &message_stream, T field) |
Result< float > | pw::protobuf::FindFloat (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a float field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< float > | pw::protobuf::FindFloat (ConstByteSpan message, T field) |
Result< float > | pw::protobuf::FindFloat (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a float field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< float > | pw::protobuf::FindFloat (stream::Reader &message_stream, T field) |
Result< double > | pw::protobuf::FindDouble (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a double field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< double > | pw::protobuf::FindDouble (ConstByteSpan message, T field) |
Result< double > | pw::protobuf::FindDouble (stream::Reader &message_stream, uint32_t field_number) |
Scans a serialized protobuf message for a double field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< double > | pw::protobuf::FindDouble (stream::Reader &message_stream, T field) |
Result< std::string_view > | pw::protobuf::FindString (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a string field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< std::string_view > | pw::protobuf::FindString (ConstByteSpan message, T field) |
StatusWithSize | pw::protobuf::FindString (stream::Reader &message_stream, uint32_t field_number, span< char > out) |
Scans a serialized protobuf message for a string field, copying its data into the provided buffer. | |
StatusWithSize | pw::protobuf::FindString (stream::Reader &message_stream, uint32_t field_number, InlineString<> &out) |
Scans a serialized protobuf message for a string field, copying its data into the provided buffer. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
StatusWithSize | pw::protobuf::FindString (stream::Reader &message_stream, T field, span< char > out) |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
StatusWithSize | pw::protobuf::FindString (stream::Reader &message_stream, T field, InlineString<> &out) |
Result< ConstByteSpan > | pw::protobuf::FindBytes (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a bytes field. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< ConstByteSpan > | pw::protobuf::FindBytes (ConstByteSpan message, T field) |
StatusWithSize | pw::protobuf::FindBytes (stream::Reader &message_stream, uint32_t field_number, ByteSpan out) |
Scans a serialized protobuf message for a bytes field, copying its data into the provided buffer. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
StatusWithSize | pw::protobuf::FindBytes (stream::Reader &message_stream, T field, ByteSpan out) |
Result< ConstByteSpan > | pw::protobuf::FindSubmessage (ConstByteSpan message, uint32_t field_number) |
Scans a serialized protobuf message for a submessage. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< ConstByteSpan > | pw::protobuf::FindSubmessage (ConstByteSpan message, T field) |
Result< ConstByteSpan > | pw::protobuf::FindRaw (ConstByteSpan message, uint32_t field_number) |
Returns a span containing the raw bytes of the value. | |
template<typename T , typename = std::enable_if_t<std::is_enum_v<T>>> | |
Result< ConstByteSpan > | pw::protobuf::FindRaw (ConstByteSpan message, T field) |
Sometimes, only a single field from a serialized message needs to be read. In these cases, setting up a decoder and iterating through the message is a lot of boilerplate. pw_protobuf
provides convenient Find*()
functions which handle this for you.
Find*()
linearly scans through the message. If you have to read multiple fields, it is more efficient to instantiate your own decoder as described above.
|
inline |
Scans a serialized protobuf message for a bool
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a bool
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a bytes
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the subspan of the buffer containing the bytes field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a bytes
field, copying its data into the provided buffer.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the size of the copied data. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a double
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a double
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a fixed32
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a fixed32
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a fixed64
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a fixed64
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a float
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a float
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an int32
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an int32
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an int64
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an int64
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sfixed32
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sfixed32
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sfixed64
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sfixed64
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sint32
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sint32
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sint64
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for an sint64
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a string
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns a subspan of the buffer containing the string field. * **NOTE**: The returned string is NOT null-terminated. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a string
field, copying its data into the provided buffer.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
out | String to which to write the found value. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the size of the copied data. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a string
field, copying its data into the provided buffer.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
out | The buffer to which to write the string. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the size of the copied data. * **NOTE**: The returned string is NOT null-terminated. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a submessage.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the subspan of the buffer containing the submessage. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a uint32
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a uint32
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a uint64
field.
message | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *
|
inline |
Scans a serialized protobuf message for a uint64
field.
message_stream | The serialized message to search. |
field_number | Protobuf field number of the field. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: Returns the field. * * NOT_FOUND: The field is not present. * * DATA_LOSS: The serialized message is not a valid protobuf. * * FAILED_PRECONDITION: The field exists, but is not the correct type. * *