LibCore: Add Stream::read_all()

This commit is contained in:
Michiel Visser 2022-04-05 21:17:38 +02:00 committed by Andreas Kling
commit 68772463cb
Notes: sideshowbarker 2024-07-17 10:43:37 +09:00
2 changed files with 17 additions and 0 deletions

View file

@ -37,6 +37,7 @@ public:
/// Tries to fill the entire buffer through reading. Returns whether the
/// buffer was filled without an error.
virtual bool read_or_error(Bytes);
ErrorOr<ByteBuffer> read_all();
virtual bool is_writable() const { return false; }
/// Tries to write the entire contents of the buffer. It is possible for