Result of a Stream read/write.
More...
#include <stream.hpp>
Result of a Stream read/write.
Consumers should check ok() first. On ok():
- bytes == 0 means "end of stream" for read, "no room" for write (backends that do not distinguish will report Closed / WouldBlock).
- bytes > 0 means that many bytes were transferred.
◆ closed()
| bool pulp::runtime::StreamResult::closed |
( |
| ) |
const |
|
inlineconstexpr |
◆ fail()
◆ make()
| constexpr StreamResult pulp::runtime::StreamResult::make |
( |
std::size_t | n | ) |
|
|
inlinestaticconstexpr |
◆ ok()
| bool pulp::runtime::StreamResult::ok |
( |
| ) |
const |
|
inlineconstexpr |
◆ would_block()
| bool pulp::runtime::StreamResult::would_block |
( |
| ) |
const |
|
inlineconstexpr |
◆ bytes
| std::size_t pulp::runtime::StreamResult::bytes = 0 |
◆ error
The documentation for this struct was generated from the following file:
- /home/runner/work/pulp/pulp/core/runtime/include/pulp/runtime/stream.hpp