24using Bytes = std::vector<uint8_t>;
33 : data_(reinterpret_cast<const uint8_t*>(s.
data())), size_(s.
size()) {}
35 const uint8_t*
data() const noexcept {
return data_; }
36 size_t size() const noexcept {
return size_; }
37 bool empty() const noexcept {
return size_ == 0; }
39 const uint8_t*
begin() const noexcept {
return data_; }
40 const uint8_t*
end() const noexcept {
return data_ + size_; }
45 const uint8_t* data_ =
nullptr;
55 uint8_t*
data() const noexcept {
return data_; }
56 size_t size() const noexcept {
return size_; }
57 bool empty() const noexcept {
return size_ == 0; }
59 uint8_t*
begin() const noexcept {
return data_; }
60 uint8_t*
end() const noexcept {
return data_ + size_; }
65 uint8_t* data_ =
nullptr;
Non-owning view over a contiguous run of writable bytes.
uint8_t * end() const noexcept
uint8_t * data() const noexcept
constexpr ByteSpan()=default
bool empty() const noexcept
constexpr ByteSpan(uint8_t *data, size_t size)
uint8_t * begin() const noexcept
size_t size() const noexcept
Non-owning view over a contiguous run of bytes.
ByteView(const std::string &s)
bool empty() const noexcept
const uint8_t * begin() const noexcept
size_t size() const noexcept
const uint8_t * end() const noexcept
constexpr ByteView()=default
const uint8_t * data() const noexcept
constexpr ByteView(const uint8_t *data, size_t size)
std::vector< uint8_t > Bytes