|
Crunch
A Message Definition Language for Getting Things Right
|
A lightweight wrapper around a std::array for serializing/deserializing messages. More...
#include <crunch.hpp>
Public Types | |
| using | MessageType = Message |
| using | IntegrityType = Integrity |
| using | SerdesType = Serdes |
Public Member Functions | |
| constexpr auto | span () noexcept |
| constexpr auto | span () const noexcept |
| constexpr auto | serialized_message_span () const noexcept |
Public Attributes | |
| std::array< std::byte, N > | data |
| std::size_t | used_bytes {0} |
Static Public Attributes | |
| static constexpr std::size_t | Size = N |
A lightweight wrapper around a std::array for serializing/deserializing messages.
Encodes the Message, Integrity, and Serdes types, and provides a span interface to the underlying data.
| Message | The CrunchMessage type this buffer is for. |
| Integrity | The IntegrityPolicy used. |
| Serdes | The SerdesPolicy used. |
| N | The size of the buffer in bytes. |