bsa::components::basic_byte_container class

A basic byte storage container.

Primarily stores non-allocating, immutable views into externally backed data, but is capable of managing its data's lifetime as a convenience.

Derived classes

class byte_container
A byte storage container without compression support.
class compressed_byte_container
A byte storage container with compression support.

Assignment

auto operator=(const basic_byte_container&) -> basic_byte_container& defaulted noexcept
auto operator=(basic_byte_container&&) -> basic_byte_container& defaulted noexcept

Capacity

auto empty() const -> bool noexcept
Checks if the underlying byte container is empty.
auto size() const -> std::size_t noexcept
Returns the size of the underlying byte container.

Constructors

basic_byte_container() defaulted noexcept
basic_byte_container(const basic_byte_container&) defaulted noexcept
basic_byte_container(basic_byte_container&&) defaulted noexcept

Destructor

~basic_byte_container() defaulted noexcept

Element access

auto as_bytes() const -> std::span<const std::byte> noexcept
Retrieves an immutable view into the underlying bytes.
auto data() const -> const std::byte* noexcept
Retrieves an immutable pointer to the underlying bytes.