|
| Result< T > | Last () |
| | Finds the last occurrence of the field.
|
| |
| Result< T > | Find (Occurrence occurrence) |
| | Finds the first or last occurrence of the field.
|
| |
◆ Find()
template<typename Derived , typename T >
Finds the first or last occurrence of the field.
- Parameters
-
| occurrence | Whether to find the first or last occurrence. |
- Returns
- A Result containing the field on success or one of the following error codes on failure:
◆ Last()
template<typename Derived , typename T >
Finds the last occurrence of the field.
This method iterates through the message, calling Next() on the derived class repeatedly until the field is no longer found. The last successfully read value is returned.
- Returns
- A Result containing the last occurrence of the field on success or one of the following error codes on failure:
- NOT_FOUND: The field is not present in the message.
- Other errors from the underlying decoder.
The documentation for this class was generated from the following file:
- pw_protobuf/public/pw_protobuf/find.h