| 29 | size_{std::exchange(other.size_, 0)} {} |
| 30 | |
| 31 | auto IoBuffer::operator=(IoBuffer&& other) noexcept -> IoBuffer& { |
| 32 | if (this != &other) { |
| 33 | free(data_); |
| 34 | data_ = std::exchange(other.data_, nullptr); |
| 35 | size_ = std::exchange(other.size_, 0); |
| 36 | } |
| 37 | return *this; |
| 38 | } |
| 39 | |
| 40 | auto IoBuffer::GetBuffer() const -> std::span<const uint8_t> { |
| 41 | return {data_, size_}; |