Zero-copy view into a decoded packet buffer.
PacketView provides read-only access to a validated packet without copying the message data. Use begin_as<T>/end_as<T> to iterate over messages with type checking, or GetPayload() for raw access.
- Note
- The view is only valid while the underlying buffer exists. Do not store views beyond the lifetime of the source buffer.
Definition at line 170 of file packet.h.
template<typename MsgType >
Get type-safe iterator to the first message.
Returns an empty iterator if MsgType::kTypeId doesn't match the packet's message type, providing compile-time type safety with runtime validation.
- Template Parameters
-
| MsgType | The expected message type |
- Returns
- Iterator to first message, or end iterator on type mismatch
Definition at line 190 of file packet.h.