6#ifndef OPENCBDC_TX_SRC_SERIALIZATION_BUFFER_SERIALIZER_H_
7#define OPENCBDC_TX_SRC_SERIALIZATION_BUFFER_SERIALIZER_H_
22 explicit operator bool()
const final;
42 auto write(
const void* data,
size_t len) ->
bool final;
50 auto read(
void* data,
size_t len) ->
bool final;
Serializer implementation for buffer.
void advance_cursor(size_t len) final
Moves the cursor forward by the given number of bytes.
auto read(void *data, size_t len) -> bool final
Read the given number of bytes from the buffer from the current cursor position into the given memory...
auto write(const void *data, size_t len) -> bool final
Write the given bytes into the buffer from the current cursor position.
auto end_of_buffer() const -> bool final
Indicates whether the cursor is at or beyond the end of the buffer.
void reset() final
Resets the cursor to the start of the buffer.
buffer_serializer(cbdc::buffer &pkt)
Constructor.
Buffer to store and retrieve byte data.
Interface for serializing objects into and out of raw bytes representations.