Synchronous, non-owning stage input borrow.
More...
#include <StormByte/buffer/pipe.hxx>
Synchronous, non-owning stage input borrow.
- Warning
- Neither this facade nor its copies may outlive the callback. The underlying buffer and its provider must remain alive throughout it.
◆ PipeInput()
| StormByte::Buffer::PipeInput::PipeInput |
( |
ReadOnly & | input | ) |
|
|
explicitnoexcept |
Borrow a live stream input.
- Parameters
-
| input | Buffer kept alive by the caller for the whole invocation. |
◆ Available()
Query readable bytes.
- Returns
- Available byte count.
◆ EoF()
| bool StormByte::Buffer::PipeInput::EoF |
( |
| ) |
const |
|
noexcept |
Query the end of the borrowed stream.
- Returns
- Whether no more bytes can be read.
◆ IsReadable()
| bool StormByte::Buffer::PipeInput::IsReadable |
( |
| ) |
const |
|
noexcept |
Query the borrowed stream error state.
- Returns
- Whether the stream can still be read.
◆ Read()
Read bytes and advance the borrowed cursor.
- Parameters
-
| count | Bytes to read. Zero reads all available bytes. |
| data | Destination bytes. |
- Returns
- Whether the read succeeded.
The documentation for this class was generated from the following file: