4#ifndef TETL_NET_BUFFER_MUTABLE_HPP
5#define TETL_NET_BUFFER_MUTABLE_HPP
7#include <etl/version.hpp>
9#include <etl/array.hpp>
10#include <etl/cstddef.hpp>
12namespace etl::experimental::
net {
39 auto const offset = n < _size ? n : _size;
40 _data =
static_cast<
char*>(_data) + offset;
46 void* _data =
nullptr;
47 etl::size_t _size = 0;
56 auto* data =
static_cast<
char*>(b
.data()) + offset;
Definition adjacent_find.hpp:9
Definition buffer_mutable.hpp:13
auto operator+=(etl::size_t n) noexcept -> mutable_buffer &
Move the start of the buffer by the specified number of bytes.
Definition buffer_mutable.hpp:37
auto data() const noexcept -> void *
Get a pointer to the beginning of the memory range.
Definition buffer_mutable.hpp:25
mutable_buffer(void *data, etl::size_t size)
Construct a buffer to represent a given memory range.
Definition buffer_mutable.hpp:18
auto operator+(etl::size_t const n, mutable_buffer const &b) noexcept -> mutable_buffer
Create a new modifiable buffer that is offset from the start of another.
Definition buffer_mutable.hpp:64
auto operator+(mutable_buffer const &b, etl::size_t const n) noexcept -> mutable_buffer
Create a new modifiable buffer that is offset from the start of another.
Definition buffer_mutable.hpp:53
mutable_buffer() noexcept=default
Construct an empty buffer.
auto size() const noexcept -> etl::size_t
Get the size of the memory range.
Definition buffer_mutable.hpp:31