summaryrefslogtreecommitdiff
path: root/src/io.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/io.hh')
-rw-r--r--src/io.hh6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/io.hh b/src/io.hh
index 315d0bb..e93b72b 100644
--- a/src/io.hh
+++ b/src/io.hh
@@ -10,7 +10,8 @@ namespace io {
enum class ReadError {
Error,
- InvalidData, // Used by decompress and such
+ InvalidData, // invalid data read (not used by raw file)
+ MaxTooSmall, // max argument needs to be bigger (not used by raw file)
};
enum class OpenError {
@@ -27,11 +28,8 @@ class Reader {
size_t max) = 0;
[[nodiscard]] virtual std::expected<size_t, ReadError> skip(size_t max) = 0;
- [[nodiscard]] std::expected<size_t, ReadError> read(std::string& str);
-
[[nodiscard]] std::expected<size_t, ReadError> repeat_read(void* dst,
size_t max);
- [[nodiscard]] std::expected<size_t, ReadError> repeat_read(std::string& str);
[[nodiscard]] std::expected<size_t, ReadError> repeat_skip(size_t max);
protected: