#pragma once #include #include class Buffer { public: Buffer(); ~Buffer(); Buffer(Buffer&& other); Buffer(const Buffer& other) = delete; // For now. static Result create_sized(usize size); Result try_resize(usize new_size); Result create_slice_at_end(usize size); u8* data() { return m_data; } const u8* data() const { return m_data; } usize size() const { return m_size; } private: Buffer(u8* data, usize size); u8* m_data { nullptr }; usize m_size { 0 }; };